1 | <?php |
||
16 | abstract class FieldAbstract implements FieldInterface |
||
17 | { |
||
18 | /** @var string $name */ |
||
19 | private $name; |
||
20 | |||
21 | /** @var string $id */ |
||
22 | private $id; |
||
23 | |||
24 | /** @var string $class */ |
||
25 | private $class; |
||
26 | |||
27 | /** @var FilterCollection $filterCollection */ |
||
28 | private $filterCollection; |
||
29 | |||
30 | /** @var ValidatorCollection $validatorCollection */ |
||
31 | private $validatorCollection; |
||
32 | |||
33 | private $value; |
||
34 | |||
35 | /** @var array $errorMessages */ |
||
36 | private $errorMessages; |
||
37 | |||
38 | /** @var string $label */ |
||
39 | private $label; |
||
40 | |||
41 | /** |
||
42 | * @return string |
||
43 | */ |
||
44 | abstract public function getTag(); |
||
45 | |||
46 | /** |
||
47 | * @return mixed |
||
48 | */ |
||
49 | abstract public function getTagType(); |
||
50 | |||
51 | 9 | public function __construct($name, $value = null) |
|
58 | |||
59 | /** |
||
60 | * @return string |
||
61 | */ |
||
62 | 8 | public function getName() |
|
66 | |||
67 | /** |
||
68 | * @param string $name |
||
69 | * @return FieldAbstract |
||
70 | */ |
||
71 | 9 | public function setName($name) |
|
76 | |||
77 | /** |
||
78 | * @return string |
||
79 | */ |
||
80 | 4 | public function getId() |
|
84 | |||
85 | /** |
||
86 | * @param string $id |
||
87 | * @return FieldAbstract |
||
88 | */ |
||
89 | 6 | public function setId($id) |
|
94 | |||
95 | /** |
||
96 | * @return string |
||
97 | */ |
||
98 | 4 | public function getClass() |
|
102 | |||
103 | /** |
||
104 | * @param string $class |
||
105 | * @return FieldAbstract |
||
106 | */ |
||
107 | 2 | public function setClass($class) |
|
112 | |||
113 | /** |
||
114 | * @return mixed |
||
115 | */ |
||
116 | 7 | public function getValue() |
|
120 | |||
121 | /** |
||
122 | * @param mixed $value |
||
123 | * @return FieldAbstract |
||
124 | */ |
||
125 | 7 | public function setValue($value) |
|
131 | |||
132 | /** |
||
133 | * @param ValidatorInterface $validator |
||
134 | * @return $this |
||
135 | */ |
||
136 | 4 | public function addValidator(ValidatorInterface $validator) |
|
141 | |||
142 | /** |
||
143 | * @return ValidatorCollection |
||
144 | */ |
||
145 | 1 | public function getValidators() |
|
149 | |||
150 | /** |
||
151 | * @param FilterInterface $filter |
||
152 | * @return $this |
||
153 | */ |
||
154 | 2 | public function addFilter(FilterInterface $filter) |
|
159 | |||
160 | /** |
||
161 | * @return FilterCollection |
||
162 | */ |
||
163 | 1 | public function getFilters() |
|
167 | |||
168 | /** |
||
169 | * @param mixed $value |
||
|
|||
170 | * @return bool |
||
171 | * @throws Exception If validation of $value is impossible |
||
172 | */ |
||
173 | 4 | public function isValid() |
|
184 | |||
185 | /** |
||
186 | * @param FieldInterface $field |
||
187 | */ |
||
188 | 3 | private function checkForErrors(ValidatorInterface $validator) |
|
196 | |||
197 | 7 | private function filterValue() |
|
208 | |||
209 | /** |
||
210 | * @return array |
||
211 | */ |
||
212 | 2 | public function getMessages() |
|
216 | |||
217 | /** |
||
218 | * @return string |
||
219 | */ |
||
220 | 3 | public function getLabel() |
|
224 | |||
225 | /** |
||
226 | * @param string $label |
||
227 | * @return FieldAbstract |
||
228 | */ |
||
229 | 1 | public function setLabel($label) |
|
234 | } |
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.