1 | <?php |
||
4 | class PHPClass |
||
5 | { |
||
6 | |||
7 | protected $name; |
||
8 | |||
9 | protected $namespace; |
||
10 | |||
11 | protected $doc; |
||
12 | |||
13 | 16 | public static function createFromFQCN($className) |
|
21 | |||
22 | 33 | public function __construct($name = null, $namespace = null) |
|
27 | |||
28 | 26 | public function getName() |
|
32 | |||
33 | 30 | public function setName($name) |
|
38 | |||
39 | 27 | public function getNamespace() |
|
43 | |||
44 | 30 | public function setNamespace($namespace) |
|
49 | |||
50 | 8 | public function getDoc() |
|
54 | |||
55 | 30 | public function setDoc($doc) |
|
60 | |||
61 | 1 | public function __toString() |
|
65 | |||
66 | 31 | public function getFullName() |
|
70 | |||
71 | protected $checks = array(); |
||
72 | |||
73 | /** |
||
74 | * |
||
75 | * @var PHPConstant[] |
||
76 | */ |
||
77 | protected $constants = array(); |
||
78 | |||
79 | /** |
||
80 | * |
||
81 | * @var PHPProperty[] |
||
82 | */ |
||
83 | protected $properties = array(); |
||
84 | |||
85 | /** |
||
86 | * |
||
87 | * @param |
||
88 | * $property |
||
89 | * @return array |
||
90 | */ |
||
91 | public function getChecks($property) |
||
95 | |||
96 | /** |
||
97 | * |
||
98 | * @param |
||
99 | * $property |
||
100 | * @param |
||
101 | * $check |
||
102 | * @param |
||
103 | * $value |
||
104 | * @return $this |
||
105 | */ |
||
106 | 1 | public function addCheck($property, $check, $value) |
|
111 | |||
112 | /** |
||
113 | * |
||
114 | * @return PHPProperty[] |
||
115 | */ |
||
116 | 19 | public function getProperties() |
|
120 | |||
121 | /** |
||
122 | * |
||
123 | * @param string $name |
||
124 | * @return boolean |
||
125 | */ |
||
126 | 8 | public function hasProperty($name) |
|
130 | |||
131 | /** |
||
132 | * |
||
133 | * @param string $name |
||
134 | * @return bool |
||
135 | */ |
||
136 | 8 | public function hasPropertyInHierarchy($name) |
|
146 | |||
147 | /** |
||
148 | * |
||
149 | * @param string $name |
||
150 | * @return PHPProperty |
||
151 | */ |
||
152 | 2 | public function getPropertyInHierarchy($name) |
|
162 | |||
163 | /** |
||
164 | * |
||
165 | * @param string $name |
||
|
|||
166 | * @return PHPProperty |
||
167 | */ |
||
168 | 2 | public function getPropertiesInHierarchy() |
|
178 | |||
179 | /** |
||
180 | * |
||
181 | * @param string $name |
||
182 | * @return PHPProperty |
||
183 | */ |
||
184 | 8 | public function getProperty($name) |
|
188 | |||
189 | /** |
||
190 | * |
||
191 | * @param PHPProperty $property |
||
192 | * @return $this |
||
193 | */ |
||
194 | 30 | public function addProperty(PHPProperty $property) |
|
199 | |||
200 | /** |
||
201 | * |
||
202 | * @var boolean |
||
203 | */ |
||
204 | protected $abstract; |
||
205 | |||
206 | /** |
||
207 | * |
||
208 | * @var PHPClass |
||
209 | */ |
||
210 | protected $extends; |
||
211 | |||
212 | /** |
||
213 | * |
||
214 | * @return PHPClass |
||
215 | */ |
||
216 | 19 | public function getExtends() |
|
220 | |||
221 | /** |
||
222 | * |
||
223 | * @param PHPClass $extends |
||
224 | * @return PHPClass |
||
225 | */ |
||
226 | 17 | public function setExtends(PHPClass $extends) |
|
231 | |||
232 | public function getAbstract() |
||
236 | |||
237 | 25 | public function setAbstract($abstract) |
|
242 | } |
||
243 |
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.