Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
16 | 4 | public function call(?BaseToken ...$parameters): BaseToken |
|
17 | { |
||
18 | 4 | $needle = $this->parseParameter($parameters, 0); |
|
19 | 4 | $offset = $this->parseParameter($parameters, 1); |
|
20 | |||
21 | 4 | if ($offset) { |
|
22 | 2 | $offset = $offset->getValue(); |
|
23 | } else { |
||
24 | 4 | $offset = 0; |
|
25 | } |
||
26 | |||
27 | 4 | $value = strpos($this->token->getValue(), $needle->getValue(), $offset); |
|
|
|||
28 | |||
29 | 4 | return new TokenBool($value === $offset); |
|
30 | } |
||
32 |
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.