Skip to content

Commit

Permalink
Updated the contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
gplanchat committed Nov 14, 2023
1 parent 26d3a89 commit d31b9f8
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/ExtractingInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
interface ExtractingInterface
{
/**
* @template OutputType
* @template OutputType of non-empty-array<array-key, mixed>|object
*
* @param ExtractorInterface<OutputType> $extractor
*/
Expand Down
4 changes: 2 additions & 2 deletions src/ExtractorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

use Kiboko\Contract\Bucket\ResultBucketInterface;

/** @template OutputType */
/** @template OutputType of non-empty-array<array-key, mixed>|object */
interface ExtractorInterface
{
/**
* Extract data from the given source.
*
* @return iterable<int, ResultBucketInterface<OutputType|null>>
* @return iterable<int, ResultBucketInterface<OutputType>>
*/
public function extract(): iterable;
}
6 changes: 3 additions & 3 deletions src/LoaderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
use Kiboko\Contract\Bucket\ResultBucketInterface;

/**
* @template InputType
* @template OutputType
* @template InputType of non-empty-array<array-key, mixed>|object
* @template OutputType of non-empty-array<array-key, mixed>|object
*/
interface LoaderInterface
{
/**
* Loads data in the given sink.
*
* @return \Generator<mixed, ResultBucketInterface<OutputType>|ResultBucketInterface<void>, InputType|null, void>
* @return \Generator<mixed, ResultBucketInterface<OutputType>, InputType|null, void>
*/
public function load(): \Generator;
}
4 changes: 2 additions & 2 deletions src/LoadingInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
interface LoadingInterface
{
/**
* @template InputType
* @template OutputType
* @template InputType of non-empty-array<array-key, mixed>|object
* @template OutputType of non-empty-array<array-key, mixed>|object
*
* @param LoaderInterface<InputType, OutputType> $loader
*/
Expand Down
6 changes: 3 additions & 3 deletions src/PipelineRunnerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ interface PipelineRunnerInterface
* @template InputType of non-empty-array<array-key, mixed>|object
* @template OutputType of non-empty-array<array-key, mixed>|object
*
* @param \Iterator<int, InputType|null> $source
* @param \Generator<int, ResultBucketInterface<InputType>, InputType, void> $coroutine
* @param \Iterator<positive-int, InputType|null> $source
* @param \Generator<positive-int, ResultBucketInterface<InputType>, InputType, void> $coroutine
* @param StepRejectionInterface<InputType> $rejection
* @param StepStateInterface $state
* @return \Iterator<int, ResultBucketInterface<OutputType>|null>
* @return \Iterator<positive-int, ResultBucketInterface<OutputType>|null>
*/
public function run(

Check failure on line 21 in src/PipelineRunnerInterface.php

View workflow job for this annotation

GitHub Actions / phpstan

PHPDoc tag @param references unknown parameter: $coroutine

Check failure on line 21 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.
\Iterator $source,
Expand Down
4 changes: 2 additions & 2 deletions src/TransformerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
use Kiboko\Contract\Bucket\ResultBucketInterface;

/**
* @template InputType
* @template OutputType
* @template InputType of non-empty-array<array-key, mixed>|object
* @template OutputType of non-empty-array<array-key, mixed>|object
*/
interface TransformerInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/TransformingInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
interface TransformingInterface
{
/**
* @template InputType
* @template OutputType
* @template InputType of non-empty-array<array-key, mixed>|object
* @template OutputType of non-empty-array<array-key, mixed>|object
*
* @param TransformerInterface<InputType, OutputType> $transformer
*/
Expand Down

0 comments on commit d31b9f8

Please sign in to comment.