Skip to content

Commit 5e0b1b7

Browse files
committed
Updated generics types
1 parent 8b823cc commit 5e0b1b7

File tree

6 files changed

+20
-12
lines changed

6 files changed

+20
-12
lines changed

src/ExtractingInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
interface ExtractingInterface
88
{
99
/**
10-
* @template Type
10+
* @template OutputType
1111
*
12-
* @param ExtractorInterface<Type> $extractor
12+
* @param ExtractorInterface<OutputType> $extractor
1313
*/
1414
public function extract(
1515
StepCodeInterface $step,

src/ExtractorInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

77
use Kiboko\Contract\Bucket\ResultBucketInterface;
88

9-
/** @template Type */
9+
/** @template OutputType */
1010
interface ExtractorInterface
1111
{
1212
/**
1313
* Extract data from the given source.
1414
*
15-
* @return iterable<int, ResultBucketInterface<Type|null>>
15+
* @return iterable<int, ResultBucketInterface<OutputType|null>>
1616
*/
1717
public function extract(): iterable;
1818
}

src/LoaderInterface.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@
66

77
use Kiboko\Contract\Bucket\ResultBucketInterface;
88

9-
/** @template Type */
9+
/**
10+
* @template InputType
11+
* @template OutputType
12+
*/
1013
interface LoaderInterface
1114
{
1215
/**
1316
* Loads data in the given sink.
1417
*
15-
* @return \Generator<mixed, ResultBucketInterface<Type>|ResultBucketInterface<void>, Type|null, void>
18+
* @return \Generator<mixed, ResultBucketInterface<OutputType>|ResultBucketInterface<void>, InputType|null, void>
1619
*/
1720
public function load(): \Generator;
1821
}

src/LoadingInterface.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
interface LoadingInterface
88
{
99
/**
10-
* @template Type
10+
* @template InputType
11+
* @template OutputType
1112
*
12-
* @param LoaderInterface<Type> $loader
13+
* @param LoaderInterface<InputType, OutputType> $loader
1314
*/
1415
public function load(
1516
StepCodeInterface $step,

src/TransformerInterface.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@
66

77
use Kiboko\Contract\Bucket\ResultBucketInterface;
88

9-
/** @template Type */
9+
/**
10+
* @template InputType
11+
* @template OutputType
12+
*/
1013
interface TransformerInterface
1114
{
1215
/**
1316
* Transforms the data from one format to another.
1417
*
15-
* @return \Generator<mixed, ResultBucketInterface<Type>|ResultBucketInterface<void>, Type|null, void>
18+
* @return \Generator<mixed, ResultBucketInterface<OutputType>|ResultBucketInterface<void>, InputType|null, void>
1619
*/
1720
public function transform(): \Generator;
1821
}

src/TransformingInterface.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
interface TransformingInterface
88
{
99
/**
10-
* @template Type
10+
* @template InputType
11+
* @template OutputType
1112
*
12-
* @param TransformerInterface<Type> $transformer
13+
* @param TransformerInterface<InputType, OutputType> $transformer
1314
*/
1415
public function transform(
1516
StepCodeInterface $step,

0 commit comments

Comments
 (0)