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