1 | <?php |
||
9 | class DbTable |
||
10 | { |
||
11 | /** |
||
12 | * @author Pedro Alarcao <[email protected]> |
||
13 | */ |
||
14 | public function __construct () |
||
17 | |||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | private $name; |
||
22 | |||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | private $schema; |
||
27 | |||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | private $database; |
||
32 | |||
33 | /** |
||
34 | * @var \Classes\Db\Column[] |
||
35 | */ |
||
36 | private $columns = array (); |
||
37 | |||
38 | /** |
||
39 | * @var string |
||
40 | */ |
||
41 | private $namespace; |
||
42 | |||
43 | /** |
||
44 | * @type \Classes\Db\Column[] |
||
45 | */ |
||
46 | private $primarykeys = array (); |
||
47 | |||
48 | /** |
||
49 | * @type \Classes\Db\Column[] |
||
50 | */ |
||
51 | private $foreingkeys = array (); |
||
52 | |||
53 | private $dependence = array (); |
||
54 | |||
55 | /** |
||
56 | * @type string[] |
||
57 | */ |
||
58 | private $sequence = array (); |
||
59 | |||
60 | public function populate ( $array ) |
||
68 | |||
69 | /** |
||
70 | * @param \Classes\Db\Column $column |
||
71 | */ |
||
72 | public function addColumn ( Column $column ) |
||
78 | |||
79 | /** |
||
80 | * @param $columnName |
||
81 | * |
||
82 | * @return $this |
||
83 | */ |
||
84 | public function createColumn ( $columnName ) |
||
90 | |||
91 | /** |
||
92 | * @param string $columnName |
||
93 | * |
||
94 | * @return \Classes\Db\Column |
||
95 | */ |
||
96 | public function getColumn ( $columnName ) |
||
105 | |||
106 | /** |
||
107 | * @return \Classes\Db\Column[] |
||
108 | */ |
||
109 | public function getPrimaryKeys () |
||
118 | |||
119 | /** |
||
120 | * @return bool |
||
121 | */ |
||
122 | public function hasPrimaryKey () |
||
131 | |||
132 | /** |
||
133 | * @return \Classes\Db\Column[] |
||
134 | */ |
||
135 | public function getForeingkeys () |
||
146 | |||
147 | /** |
||
148 | * @return \Classes\Db\Column[] |
||
149 | */ |
||
150 | public function getDependences () |
||
159 | |||
160 | /** |
||
161 | * @return string[] |
||
162 | */ |
||
163 | public function getSequences () |
||
172 | |||
173 | /** |
||
174 | * @return bool |
||
175 | */ |
||
176 | public function hasSequences () |
||
185 | |||
186 | /** |
||
187 | * @return \Classes\Db\Column[] |
||
188 | */ |
||
189 | public function getColumns () |
||
193 | |||
194 | /** |
||
195 | * @return string |
||
196 | */ |
||
197 | public function getName () |
||
201 | |||
202 | /** |
||
203 | * @return string |
||
204 | */ |
||
205 | public function getSchema () |
||
209 | |||
210 | /** |
||
211 | * @return bool |
||
212 | */ |
||
213 | public function hasSchema () |
||
217 | |||
218 | /** |
||
219 | * @return string |
||
220 | */ |
||
221 | public function getDatabase () |
||
225 | |||
226 | /** |
||
227 | * @return string |
||
228 | */ |
||
229 | public function getNamespace () |
||
233 | |||
234 | /** |
||
235 | * @param string $Namespace |
||
|
|||
236 | */ |
||
237 | public function setNamespace ( $namespace ) |
||
241 | |||
242 | } |
||
243 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.