Conditions | 4 |
Paths | 1 |
Total Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function __invoke() { |
||
14 | return function (string $glue, string $finalGlue = ''): string { |
||
15 | if ($finalGlue === '') { |
||
16 | return $this->implode($glue); |
||
|
|||
17 | }; |
||
18 | |||
19 | if ($this->count() === 0) { |
||
20 | return ''; |
||
21 | } |
||
22 | |||
23 | if ($this->count() === 1) { |
||
24 | return $this->last(); |
||
25 | } |
||
26 | |||
27 | $collection = new Collection($this->items); |
||
28 | |||
29 | $finalItem = $collection->pop(); |
||
30 | |||
31 | return $collection->implode($glue) . $finalGlue . $finalItem; |
||
32 | }; |
||
33 | } |
||
34 | } |
||
35 |
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.