Skip to content

Commit eec01e2

Browse files
committed
cleaner
1 parent 3332030 commit eec01e2

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

src/State/ProcessorInterface.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414
namespace ApiPlatform\State;
1515

1616
use ApiPlatform\Metadata\Operation;
17+
use Symfony\Component\HttpFoundation\Request;
1718

1819
/**
19-
* Process data: send an email, persist to storage, add to queue etc.
20+
* Processes data: sends an email, persists to storage, adds to queue etc.
2021
*
21-
* @template T
22+
* @template T1 of object
23+
* @template T2 of object
2224
*
2325
* @author Antoine Bluchet <[email protected]>
2426
*/
@@ -27,11 +29,11 @@ interface ProcessorInterface
2729
/**
2830
* Handles the state.
2931
*
30-
* @param T $data
31-
* @param array<string, mixed> $uriVariables
32-
* @param array<string, mixed>&array{request?: \Symfony\Component\HttpFoundation\Request, previous_data?: mixed, resource_class?: string, original_data?: mixed} $context
32+
* @param T1 $data
33+
* @param array<string, mixed> $uriVariables
34+
* @param array<string, mixed>&array{request?: Request, previous_data?: mixed, resource_class?: string, original_data?: mixed} $context
3335
*
34-
* @return T
36+
* @return T2
3537
*/
3638
public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = []);
3739
}

src/State/ProviderInterface.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
namespace ApiPlatform\State;
1515

1616
use ApiPlatform\Metadata\Operation;
17+
use ApiPlatform\State\Pagination\PartialPaginatorInterface;
18+
use Symfony\Component\HttpFoundation\Request;
1719

1820
/**
1921
* Retrieves data from a persistence layer.
@@ -27,10 +29,10 @@ interface ProviderInterface
2729
/**
2830
* Provides data.
2931
*
30-
* @param array<string, mixed> $uriVariables
31-
* @param array<string, mixed>|array{request?: \Symfony\Component\HttpFoundation\Request, resource_class?: string} $context
32+
* @param array<string, mixed> $uriVariables
33+
* @param array<string, mixed>|array{request?: Request, resource_class?: string} $context
3234
*
33-
* @return T|Pagination\PartialPaginatorInterface<T>|iterable<T>|null
35+
* @return T|PartialPaginatorInterface<T>|iterable<T>|null
3436
*/
3537
public function provide(Operation $operation, array $uriVariables = [], array $context = []): object|array|null;
3638
}

0 commit comments

Comments
 (0)