Conditions | 3 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
25 | 42 | protected function yieldItemsUntilKey(string $key, ?Closure $callback = null): Generator |
|
26 | { |
||
27 | 42 | yield from $this->yieldItemsUntilPage(function (ResponseInterface $response) use ($key, $callback) { |
|
28 | 38 | yield from $generator = $this->yieldItemsAndGetKey($response, $key); |
|
|
|||
29 | |||
30 | 38 | if (!is_int($page = $this->toPage($generator->getReturn()))) { |
|
31 | 1 | throw new InvalidKeyException($key); |
|
32 | } |
||
33 | |||
34 | 37 | return $callback ? $callback($page) : $page; |
|
35 | 42 | }); |
|
56 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.