| Conditions | 4 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | private function checkEnumeration($v) |
||
| 32 | { |
||
| 33 | if (is_array($this->enumeration) && 0 != count($this->enumeration) && !in_array($v, $this->enumeration)) { |
||
| 34 | throw new \InvalidArgumentException( |
||
| 35 | "The provided value for " . __CLASS__ . " is not " . |
||
| 36 | implode(" || ", $this->enumeration) |
||
| 37 | ); |
||
| 38 | } |
||
| 39 | } |
||
| 40 | } |
||
| 41 |
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.