| 1 | <?php |
||
| 5 | class Sex |
||
| 6 | { |
||
| 7 | const UNKNOWN = 0; |
||
| 8 | const MALE = 1; |
||
| 9 | const FEMALE = 2; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * Convert a sex constants to string. |
||
| 13 | * |
||
| 14 | * @param int $sex |
||
| 15 | * @return string|null |
||
| 16 | */ |
||
| 17 | public static function string($sex) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Convert a sex string to int type. |
||
| 28 | * |
||
| 29 | * @param mixed $string |
||
|
|
|||
| 30 | * @return int |
||
| 31 | */ |
||
| 32 | public static function type($sex) |
||
| 42 | |||
| 43 | /** |
||
| 44 | * All sex types. |
||
| 45 | * |
||
| 46 | * @return int[] |
||
| 47 | */ |
||
| 48 | public static function allTypes() |
||
| 52 | } |
||
| 53 |
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.