Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
49 | 2 | private function build() |
|
50 | { |
||
51 | 2 | $raw = $this->raw; |
|
52 | |||
53 | 2 | $ended = substr($raw, -1) === '$'; |
|
54 | 2 | $raw = rtrim($raw, '*'); |
|
55 | 2 | $raw = rtrim($raw, '$'); |
|
56 | |||
57 | 2 | $parts = explode('*', $raw); |
|
58 | 2 | array_walk($parts, function (&$part) { |
|
59 | 2 | $part = preg_quote($part, '/'); |
|
60 | 2 | }); |
|
61 | 2 | 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
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.