diff --git a/src/Cloud/DTO/JobList.php b/src/Cloud/DTO/JobList.php index 6cea5cbc..f090724b 100644 --- a/src/Cloud/DTO/JobList.php +++ b/src/Cloud/DTO/JobList.php @@ -8,6 +8,7 @@ readonly class JobList implements \Countable, \IteratorAggregate { + /** @var list */ private array $jobs; public function __construct( @@ -27,11 +28,6 @@ public function getIterator(): \Traversable public function codes(): array { $jobs = $this->jobs; - - /** - * @var DTO\Workflow\Pipeline|DTO\Workflow\Action $left - * @var DTO\Workflow\Pipeline|DTO\Workflow\Action $right - */ usort($jobs, fn (DTO\Workflow\JobInterface $left, DTO\Workflow\JobInterface $right) => $left->order <=> $right->order); return array_map(fn (DTO\Workflow\JobInterface $job) => $job->code->asString(), $jobs); diff --git a/src/Cloud/Workflow.php b/src/Cloud/Workflow.php index d3b63b7a..bb247201 100644 --- a/src/Cloud/Workflow.php +++ b/src/Cloud/Workflow.php @@ -183,11 +183,8 @@ private static function fromApiModel(Api\Client $client, Api\Model\WorkflowRead $step->getLabel(), new StepCode($step->getCode()), $step->getConfiguration(), - new ProbeList(...array_map( - fn (Api\Model\Probe $probe, int $order) => new Probe($probe->getLabel(), $probe->getCode(), $order), - $probes = $step->getProbes(), - range(0, is_countable($probes) ? \count($probes) : 0), - )), + /** TODO : implement probes when it is enabled */ + new ProbeList(), $order ), $steps = $job->getPipeline()->getSteps(),