Skip to content

Commit 9dbbb64

Browse files
committed
Added the JobCode to the SchedulingInterface::job() method arguments
1 parent 2e752f6 commit 9dbbb64

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
'error_suppression' => true,
3535
'ereg_to_preg' => true,
3636
'dir_constant' => true,
37+
'phpdoc_align' => ['align' => 'left'],
3738
])
3839
->setFinder($finder)
3940
->setCacheFile('.php-cs-fixer.cache') // forward compatibility with 3.x line

src/JobCodeInterface.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Kiboko\Contract\Pipeline;
6+
7+
interface JobCodeInterface extends \Stringable {}

src/PipelineRunnerInterface.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ interface PipelineRunnerInterface
1313
* @template OutputType
1414
*
1515
* @param \Iterator<int, InputType|null> $source
16-
* @param \Generator<int, ResultBucketInterface<InputType>, InputType|null, void> $coroutine
17-
* @param StepRejectionInterface<InputType> $rejection
18-
* @param StepStateInterface $state
16+
* @param StepRejectionInterface<InputType|null> $rejection
17+
*
1918
* @return \Iterator<int, ResultBucketInterface<OutputType>|null>
2019
*/
2120
public function run(

src/SchedulingInterface.php

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

99
interface SchedulingInterface
1010
{
11-
public function job(RunnableInterface $job): self;
11+
public function job(JobCodeInterface $job, RunnableInterface $job): self;
1212
}

0 commit comments

Comments
 (0)