| 1 | <?php |
||
| 4 | trait EnumerationTrait |
||
| 5 | { |
||
| 6 | /** |
||
| 7 | * @Exclude |
||
| 8 | * @var array Defines a list of acceptable values |
||
| 9 | */ |
||
| 10 | private $enumeration = null; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @param array $enumorationValues Defines a list of acceptable values |
||
| 14 | */ |
||
| 15 | protected function setEnumeration(array $enumorationValues) |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param string $enumorationValue adds a value to the enumeration set. |
||
|
|
|||
| 22 | */ |
||
| 23 | protected function addEnumeration($enumerationValue) |
||
| 24 | { |
||
| 25 | if (!is_array($this->enumeration)) { |
||
| 26 | $this->enumeration = []; |
||
| 27 | } |
||
| 28 | $this->enumeration[] = $enumerationValue; |
||
| 29 | } |
||
| 30 | |||
| 31 | private function checkEnumeration($v) |
||
| 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.