1 | <?php |
||
9 | class StringLiteral implements ValueObjectInterface |
||
10 | { |
||
11 | protected $value; |
||
12 | |||
13 | /** |
||
14 | * Returns a StringLiteral object given a PHP native string as parameter. |
||
15 | * |
||
16 | * @param string $value |
||
|
|||
17 | * @return StringLiteral |
||
18 | */ |
||
19 | 19 | public static function fromNative() |
|
25 | |||
26 | /** |
||
27 | * Returns a StringLiteral object given a PHP native string as parameter. |
||
28 | * |
||
29 | * @param string $value |
||
30 | */ |
||
31 | 89 | public function __construct($value) |
|
39 | |||
40 | /** |
||
41 | * Returns the value of the string |
||
42 | * |
||
43 | * @return string |
||
44 | */ |
||
45 | 92 | public function toNative() |
|
49 | |||
50 | /** |
||
51 | * Tells whether two string literals are equal by comparing their values |
||
52 | * |
||
53 | * @param ValueObjectInterface $stringLiteral |
||
54 | * @return bool |
||
55 | */ |
||
56 | 55 | public function sameValueAs(ValueObjectInterface $stringLiteral) |
|
64 | |||
65 | /** |
||
66 | * Tells whether the StringLiteral is empty |
||
67 | * |
||
68 | * @return bool |
||
69 | */ |
||
70 | 10 | public function isEmpty() |
|
74 | |||
75 | /** |
||
76 | * Returns the string value itself |
||
77 | * |
||
78 | * @return string |
||
79 | */ |
||
80 | 23 | public function __toString() |
|
84 | } |
||
85 |
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.