Skip to content

Commit

Permalink
Added the JobCode to the SchedulingInterface::job() method arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
gplanchat committed Nov 14, 2023
1 parent 2e752f6 commit 9dbbb64
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
'error_suppression' => true,
'ereg_to_preg' => true,
'dir_constant' => true,
'phpdoc_align' => ['align' => 'left'],
])
->setFinder($finder)
->setCacheFile('.php-cs-fixer.cache') // forward compatibility with 3.x line
Expand Down
7 changes: 7 additions & 0 deletions src/JobCodeInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

declare(strict_types=1);

namespace Kiboko\Contract\Pipeline;

interface JobCodeInterface extends \Stringable {}
5 changes: 2 additions & 3 deletions src/PipelineRunnerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ interface PipelineRunnerInterface
* @template OutputType
*
* @param \Iterator<int, InputType|null> $source
* @param \Generator<int, ResultBucketInterface<InputType>, InputType|null, void> $coroutine
* @param StepRejectionInterface<InputType> $rejection
* @param StepStateInterface $state
* @param StepRejectionInterface<InputType|null> $rejection
*
* @return \Iterator<int, ResultBucketInterface<OutputType>|null>
*/
public function run(

Check failure on line 20 in src/PipelineRunnerInterface.php

View workflow job for this annotation

GitHub Actions / phpstan

Template type OutputType of method Kiboko\Contract\Pipeline\PipelineRunnerInterface::run() is not referenced in a parameter.

Check failure on line 20 in src/PipelineRunnerInterface.php

View workflow job for this annotation

GitHub Actions / phpstan

Type mixed in generic type Kiboko\Contract\Bucket\ResultBucketInterface<mixed> in PHPDoc tag @return is not subtype of template type Type of array|object of interface Kiboko\Contract\Bucket\ResultBucketInterface.
Expand Down
2 changes: 1 addition & 1 deletion src/SchedulingInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@

interface SchedulingInterface
{
public function job(RunnableInterface $job): self;
public function job(JobCodeInterface $job, RunnableInterface $job): self;
}

0 comments on commit 9dbbb64

Please sign in to comment.