diff --git a/src/Cloud/Handler/Workflow/RemoveWorkflowCommandHandler.php b/src/Cloud/Handler/Workflow/RemoveWorkflowCommandHandler.php index 5bd2b43f..feb27c12 100644 --- a/src/Cloud/Handler/Workflow/RemoveWorkflowCommandHandler.php +++ b/src/Cloud/Handler/Workflow/RemoveWorkflowCommandHandler.php @@ -10,7 +10,7 @@ final readonly class RemoveWorkflowCommandHandler { public function __construct( - private \Gyroscops\Api\Client $client, + private Api\Client $client, ) { } diff --git a/src/Cloud/Workflow.php b/src/Cloud/Workflow.php index 60a2b8d1..fec07ff9 100644 --- a/src/Cloud/Workflow.php +++ b/src/Cloud/Workflow.php @@ -128,7 +128,7 @@ function (string $namespace) { ); } - public static function fromApiWithId(Api\Client $client, WorkflowId $id): DTO\ReferencedWorkflow + public static function fromApiWithId(Api\Client $client, WorkflowId $id): ReferencedWorkflow { /** @var Api\Model\WorkflowJsonldRead|Api\Model\WorkflowRead $item */ $item = $client->getWorkflowItem($id->asString()); @@ -145,7 +145,7 @@ public static function fromApiWithId(Api\Client $client, WorkflowId $id): DTO\Re ); } - public static function fromApiWithCode(Api\Client $client, string $code): DTO\ReferencedWorkflow + public static function fromApiWithCode(Api\Client $client, string $code): ReferencedWorkflow { $collection = $client->getWorkflowCollection(['code' => $code]); @@ -258,7 +258,7 @@ public function create(DTO\SatelliteInterface&DTO\WorkflowInterface $workflow): ); } - public function update(DTO\ReferencedWorkflow $actual, DTO\SatelliteInterface&DTO\WorkflowInterface $desired): DTO\CommandBatch + public function update(ReferencedWorkflow $actual, DTO\SatelliteInterface&DTO\WorkflowInterface $desired): DTO\CommandBatch { if ($actual->code() !== $desired->code()) { throw new \RuntimeException('Code does not match between actual and desired workflow definition.'); @@ -273,7 +273,7 @@ public function update(DTO\ReferencedWorkflow $actual, DTO\SatelliteInterface&DT return new DTO\CommandBatch(...$commands); } - public function remove(DTO\WorkflowId $id): DTO\CommandBatch + public function remove(WorkflowId $id): DTO\CommandBatch { return new DTO\CommandBatch( new Command\Workflow\RemoveWorkflowCommand($id),