| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 49 | private function build() |
||
| 50 | { |
||
| 51 | 1 | $raw = $this->raw; |
|
| 52 | |||
| 53 | 1 | $ended = substr($raw, -1) === '$'; |
|
| 54 | 1 | $raw = rtrim($raw, '*'); |
|
| 55 | 1 | $raw = rtrim($raw, '$'); |
|
| 56 | |||
| 57 | 1 | $parts = explode('*', $raw); |
|
| 58 | 1 | array_walk($parts, function (&$part) { |
|
| 59 | 1 | $part = preg_quote($part, '/'); |
|
| 60 | 1 | }); |
|
| 61 | 1 | return implode('.*', $parts).($ended?'':'.*'); |
|
| 62 | } |
||
| 63 | |||
| 103 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.