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