55namespace leinonen \DataLoader ;
66
77use React \EventLoop \LoopInterface ;
8- use function React \Promise \all ;
9- use React \Promise \ExtendedPromiseInterface ;
108use React \Promise \Promise ;
9+ use React \Promise \PromiseInterface ;
10+
11+ use function React \Promise \all ;
1112use function React \Promise \reject ;
1213use function React \Promise \resolve ;
1314
@@ -39,7 +40,7 @@ public function __construct(
3940 callable $ batchLoadFunction ,
4041 LoopInterface $ loop ,
4142 CacheMapInterface $ cacheMap ,
42- DataLoaderOptions $ options = null
43+ ? DataLoaderOptions $ options = null
4344 ) {
4445 $ this ->batchLoadFunction = $ batchLoadFunction ;
4546 $ this ->eventLoop = $ loop ;
@@ -50,7 +51,7 @@ public function __construct(
5051 /**
5152 * {@inheritdoc}
5253 */
53- public function load ($ key ): ExtendedPromiseInterface
54+ public function load ($ key ): PromiseInterface
5455 {
5556 if ($ key === null ) {
5657 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) {
8485 /**
8586 * {@inheritdoc}
8687 */
87- public function loadMany (array $ keys ): ExtendedPromiseInterface
88+ public function loadMany (array $ keys ): PromiseInterface
8889 {
8990 return all (
9091 \array_map (
@@ -272,7 +273,7 @@ private function validateBatchPromiseOutput($values, $keys): void
272273 /**
273274 * Validates the batch promise returned from the batch load function.
274275 *
275- * @param $batchPromise
276+ * @param $batchPromise
276277 *
277278 * @throws DataLoaderException
278279 */
0 commit comments