diff --git a/src/Client/WorkflowClientInterface.php b/src/Client/WorkflowClientInterface.php index 6c01a4ba..868f9513 100644 --- a/src/Client/WorkflowClientInterface.php +++ b/src/Client/WorkflowClientInterface.php @@ -119,7 +119,7 @@ public function newUntypedRunningWorkflowStub( ): WorkflowStubInterface; /** - * Creates new {@link ActivityCompletionClient} that can be used to complete activities + * Creates a new {@link ActivityCompletionClient} that can be used to complete activities * asynchronously. Only relevant for activity implementations that called {@link * ActivityContext->doNotCompleteOnReturn()}. * diff --git a/src/Client/WorkflowOptions.php b/src/Client/WorkflowOptions.php index 1555deb6..33d9f618 100644 --- a/src/Client/WorkflowOptions.php +++ b/src/Client/WorkflowOptions.php @@ -154,7 +154,7 @@ public function __construct() * @param MethodRetry|null $retry * @param CronSchedule|null $cron * - * @return self return new {@see self} instance with merged options + * @return self return a new {@see self} instance with merged options */ public function mergeWith(MethodRetry $retry = null, CronSchedule $cron = null): self { diff --git a/src/Interceptor/ActivityInboundInterceptor.php b/src/Interceptor/ActivityInboundInterceptor.php index b7038cda..f2f0af07 100644 --- a/src/Interceptor/ActivityInboundInterceptor.php +++ b/src/Interceptor/ActivityInboundInterceptor.php @@ -16,7 +16,7 @@ use Temporal\Internal\Interceptor\Interceptor; /** - * It recommended to use {@see ActivityInboundInterceptorTrait} when implementing this interface because + * It's recommended to use {@see ActivityInboundInterceptorTrait} when implementing this interface because * the interface might be extended in the future. The trait will provide forward compatibility. * * @psalm-immutable diff --git a/src/Interceptor/WorkflowClientCallsInterceptor.php b/src/Interceptor/WorkflowClientCallsInterceptor.php index ecafe459..2754115f 100644 --- a/src/Interceptor/WorkflowClientCallsInterceptor.php +++ b/src/Interceptor/WorkflowClientCallsInterceptor.php @@ -24,7 +24,7 @@ use Temporal\Workflow\WorkflowExecution; /** - * It recommended to use {@see WorkflowClientCallsInterceptorTrait} when implementing this interface because + * It's recommended to use {@see WorkflowClientCallsInterceptorTrait} when implementing this interface because * the interface might be extended in the future. The trait will provide forward compatibility. * * @psalm-immutable diff --git a/src/Interceptor/WorkflowInboundInterceptor.php b/src/Interceptor/WorkflowInboundInterceptor.php index 6a719cbe..b48845fb 100644 --- a/src/Interceptor/WorkflowInboundInterceptor.php +++ b/src/Interceptor/WorkflowInboundInterceptor.php @@ -18,7 +18,7 @@ use Temporal\Internal\Interceptor\Interceptor; /** - * It recommended to use {@see WorkflowInboundInterceptorTrait} when implementing this interface because + * It's recommended to use {@see WorkflowInboundInterceptorTrait} when implementing this interface because * the interface might be extended in the future. The trait will provide forward compatibility. * * @psalm-immutable diff --git a/src/Interceptor/WorkflowOutboundCallsInterceptor.php b/src/Interceptor/WorkflowOutboundCallsInterceptor.php index a6178377..9f2c819d 100644 --- a/src/Interceptor/WorkflowOutboundCallsInterceptor.php +++ b/src/Interceptor/WorkflowOutboundCallsInterceptor.php @@ -32,7 +32,7 @@ /** * Interceptor for outbound workflow calls. * - * It recommended to use {@see WorkflowOutboundCallsInterceptorTrait} when implementing this interface because + * It's recommended to use {@see WorkflowOutboundCallsInterceptorTrait} when implementing this interface because * the interface might be extended in the future. The trait will provide forward compatibility. * * @psalm-immutable diff --git a/src/Interceptor/WorkflowOutboundRequestInterceptor.php b/src/Interceptor/WorkflowOutboundRequestInterceptor.php index 8c5dee82..2e8a6679 100644 --- a/src/Interceptor/WorkflowOutboundRequestInterceptor.php +++ b/src/Interceptor/WorkflowOutboundRequestInterceptor.php @@ -19,7 +19,7 @@ /** * Intercept a request before it's sent to RoadRunner. * - * It recommended to use {@see WorkflowOutboundRequestInterceptorTrait} when implementing this interface because + * It's recommended to use {@see WorkflowOutboundRequestInterceptorTrait} when implementing this interface because * the interface might be extended in the future. The trait will provide forward compatibility. * * @psalm-immutable diff --git a/src/Internal/Workflow/Process/Scope.php b/src/Internal/Workflow/Process/Scope.php index b394c5e3..e7b5585e 100644 --- a/src/Internal/Workflow/Process/Scope.php +++ b/src/Internal/Workflow/Process/Scope.php @@ -326,11 +326,6 @@ public function onAwait(Deferred $deferred): void $deferred->promise()->then($cleanup, $cleanup); } - /** - * @param bool $detached - * @param string|null $layer - * @return self - */ protected function createScope(bool $detached, string $layer = null, WorkflowContextInterface $context = null): self { $scope = new Scope($this->services, $context ?? $this->context); @@ -421,6 +416,7 @@ protected function onRequest(RequestInterface $request, PromiseInterface $promis $this->context->getClient()->cancel($request); return; } + // todo ->context or ->scopeContext? $this->context->getClient()->request(new Cancel($request->getID()), $this->scopeContext); }; @@ -470,6 +466,7 @@ protected function next(): void $this->nextPromise($current->promise()); break; + // todo ->context or ->scopeContext? case $current instanceof RequestInterface: $this->nextPromise($this->context->getClient()->request($current, $this->scopeContext)); break; diff --git a/src/Workflow.php b/src/Workflow.php index ab86e1c6..a1d397e9 100644 --- a/src/Workflow.php +++ b/src/Workflow.php @@ -361,7 +361,7 @@ public static function registerQuery(string $queryType, callable $handler): Scop * The same method ({@see WorkflowStubInterface::signal()}) should be used * to call such signal handlers as in the case of ordinary signal methods. * - * @param string $queryType + * @param non-empty-string $queryType * @param callable $handler * @return ScopedContextInterface * @throws OutOfContextException in the absence of the workflow execution context. diff --git a/tests/Fixtures/src/Workflow/RuntimeSignalWorkflow.php b/tests/Fixtures/src/Workflow/RuntimeSignalWorkflow.php index 2964d3b8..7d6d52df 100644 --- a/tests/Fixtures/src/Workflow/RuntimeSignalWorkflow.php +++ b/tests/Fixtures/src/Workflow/RuntimeSignalWorkflow.php @@ -26,7 +26,7 @@ public function handler() $counter = 0; - Workflow::registerSignal('add', function ($value) use (&$counter, $wait1, $wait2) { + Workflow::registerSignal('add', static function ($value) use (&$counter, $wait1, $wait2) { $counter += $value; $wait1->resolve($value); $wait2->resolve($value);