Skip to content

Commit 45dc906

Browse files
committed
Fixed PHPStan errors
1 parent 3bad503 commit 45dc906

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

src/Cloud/DTO/JobList.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
readonly class JobList implements \Countable, \IteratorAggregate
1010
{
11+
/** @var DTO\Workflow\JobInterface<DTO\Workflow\Pipeline|DTO\Workflow\Action>[] */
1112
private array $jobs;
1213

1314
public function __construct(
@@ -27,11 +28,6 @@ public function getIterator(): \Traversable
2728
public function codes(): array
2829
{
2930
$jobs = $this->jobs;
30-
31-
/**
32-
* @var DTO\Workflow\Pipeline|DTO\Workflow\Action $left
33-
* @var DTO\Workflow\Pipeline|DTO\Workflow\Action $right
34-
*/
3531
usort($jobs, fn (DTO\Workflow\JobInterface $left, DTO\Workflow\JobInterface $right) => $left->order <=> $right->order);
3632

3733
return array_map(fn (DTO\Workflow\JobInterface $job) => $job->code->asString(), $jobs);

src/Cloud/Workflow.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,8 @@ private static function fromApiModel(Api\Client $client, Api\Model\WorkflowRead
183183
$step->getLabel(),
184184
new StepCode($step->getCode()),
185185
$step->getConfiguration(),
186-
new ProbeList(...array_map(
187-
fn (Api\Model\Probe $probe, int $order) => new Probe($probe->getLabel(), $probe->getCode(), $order),
188-
$probes = $step->getProbes(),
189-
range(0, is_countable($probes) ? \count($probes) : 0),
190-
)),
186+
/** TODO : implement probes when it is enabled */
187+
new ProbeList(),
191188
$order
192189
),
193190
$steps = $job->getPipeline()->getSteps(),

0 commit comments

Comments
 (0)