5
5
namespace leinonen \DataLoader ;
6
6
7
7
use React \EventLoop \LoopInterface ;
8
- use function React \Promise \all ;
9
- use React \Promise \ExtendedPromiseInterface ;
10
8
use React \Promise \Promise ;
9
+ use React \Promise \PromiseInterface ;
10
+
11
+ use function React \Promise \all ;
11
12
use function React \Promise \reject ;
12
13
use function React \Promise \resolve ;
13
14
@@ -39,7 +40,7 @@ public function __construct(
39
40
callable $ batchLoadFunction ,
40
41
LoopInterface $ loop ,
41
42
CacheMapInterface $ cacheMap ,
42
- DataLoaderOptions $ options = null
43
+ ? DataLoaderOptions $ options = null
43
44
) {
44
45
$ this ->batchLoadFunction = $ batchLoadFunction ;
45
46
$ this ->eventLoop = $ loop ;
@@ -50,7 +51,7 @@ public function __construct(
50
51
/**
51
52
* {@inheritdoc}
52
53
*/
53
- public function load ($ key ): ExtendedPromiseInterface
54
+ public function load ($ key ): PromiseInterface
54
55
{
55
56
if ($ key === null ) {
56
57
throw new \InvalidArgumentException (self ::class . '::load must be called with a value, but got null ' );
@@ -84,7 +85,7 @@ function (callable $resolve, callable $reject) use ($key) {
84
85
/**
85
86
* {@inheritdoc}
86
87
*/
87
- public function loadMany (array $ keys ): ExtendedPromiseInterface
88
+ public function loadMany (array $ keys ): PromiseInterface
88
89
{
89
90
return all (
90
91
\array_map (
@@ -272,7 +273,7 @@ private function validateBatchPromiseOutput($values, $keys): void
272
273
/**
273
274
* Validates the batch promise returned from the batch load function.
274
275
*
275
- * @param $batchPromise
276
+ * @param $batchPromise
276
277
*
277
278
* @throws DataLoaderException
278
279
*/
0 commit comments