| Conditions | 3 |
| Paths | 3 |
| Total Lines | 21 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | 6 | public function call($parameters = null): BaseToken |
|
| 25 | { |
||
| 26 | 6 | $value = $this->token->getValue(); |
|
| 27 | |||
| 28 | /** @var BaseToken[] $parameters */ |
||
| 29 | 6 | $parameters = func_get_args(); |
|
| 30 | |||
| 31 | 6 | foreach ($parameters as $parameter) { |
|
| 32 | 6 | if ($parameter instanceof TokenArray) { |
|
| 33 | 2 | $value .= implode(',', $parameter->toArray()); |
|
| 34 | } else { |
||
| 35 | 6 | $value .= $parameter->getValue(); |
|
| 36 | } |
||
| 37 | } |
||
| 38 | |||
| 39 | 6 | return new TokenString( |
|
| 40 | 6 | $value, |
|
| 41 | 6 | $this->token->getOffset(), |
|
| 42 | 6 | $this->token->getStack() |
|
| 43 | ); |
||
| 44 | } |
||
| 45 | |||
| 51 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$irelandis not defined by the methodfinale(...).The most likely cause is that the parameter was changed, but the annotation was not.