1 | <?php |
||
10 | abstract class Enum extends BaseEnum implements ValueObjectInterface, \Serializable |
||
11 | { |
||
12 | |||
13 | use EnumSerializableTrait; |
||
14 | |||
15 | /** |
||
16 | * Returns a new Enum object from passed value matching argument |
||
17 | * |
||
18 | * @param string $value |
||
|
|||
19 | * @return static |
||
20 | */ |
||
21 | 4 | public static function fromNative() |
|
25 | |||
26 | /** |
||
27 | * Returns the PHP native value of the enum |
||
28 | * |
||
29 | * @return mixed |
||
30 | */ |
||
31 | 67 | public function toNative() |
|
35 | |||
36 | /** |
||
37 | * Tells whether two Enum objects are sameValueAs by comparing their values |
||
38 | * |
||
39 | * @param Enum $enum |
||
40 | * @return bool |
||
41 | */ |
||
42 | 23 | public function sameValueAs(ValueObjectInterface $enum) |
|
50 | |||
51 | /** |
||
52 | * Returns a native string representation of the Enum value |
||
53 | * |
||
54 | * @return string |
||
55 | */ |
||
56 | 30 | public function __toString() |
|
60 | |||
61 | |||
62 | function jsonSerialize() |
||
69 | } |
||
70 |
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.