1 | <?php |
||
9 | class DbTable |
||
10 | { |
||
11 | /** |
||
12 | * @author Pedro Alarcao <[email protected]> |
||
13 | */ |
||
14 | final private function __construct () |
||
17 | |||
18 | /** |
||
19 | * @return \Classes\Db\DbTable |
||
20 | */ |
||
21 | public static function getInstance(){ |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | private $name; |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | private $schema; |
||
34 | |||
35 | /** |
||
36 | * @var string |
||
37 | */ |
||
38 | private $database; |
||
39 | |||
40 | /** |
||
41 | * @var \Classes\Db\Column[] |
||
42 | */ |
||
43 | private $columns = array (); |
||
44 | |||
45 | /** |
||
46 | * @var string |
||
47 | */ |
||
48 | private $namespace; |
||
49 | |||
50 | /** |
||
51 | * @type \Classes\Db\Column[] |
||
52 | */ |
||
53 | private $primarykeys = array (); |
||
54 | |||
55 | /** |
||
56 | * @type \Classes\Db\Column[] |
||
57 | */ |
||
58 | private $foreingkeys = array (); |
||
59 | |||
60 | private $dependence = array (); |
||
61 | |||
62 | /** |
||
63 | * @type string[] |
||
64 | */ |
||
65 | private $sequence = array (); |
||
66 | |||
67 | public function populate ( $array ) |
||
75 | |||
76 | /** |
||
77 | * adiciona uma coluna |
||
78 | * |
||
79 | * @param \Classes\Db\Column $column |
||
80 | */ |
||
81 | public function addColumn ( Column $column ) |
||
87 | |||
88 | /** |
||
89 | * @param string $columnName |
||
90 | * |
||
91 | * @return \Classes\Db\Column |
||
92 | */ |
||
93 | public function getColumn ( $columnName ) |
||
97 | |||
98 | public function hasColumn ( $columnName ) |
||
102 | |||
103 | /** |
||
104 | * @return \Classes\Db\Column[] |
||
105 | */ |
||
106 | public function getPrimaryKeys () |
||
115 | |||
116 | /** |
||
117 | * @return bool |
||
118 | */ |
||
119 | public function hasPrimaryKey () |
||
128 | |||
129 | /** |
||
130 | * @return \Classes\Db\Column[] |
||
131 | */ |
||
132 | public function getForeingkeys () |
||
143 | |||
144 | /** |
||
145 | * @return \Classes\Db\Column[] |
||
146 | */ |
||
147 | public function getDependences () |
||
156 | |||
157 | /** |
||
158 | * @return string[] |
||
159 | */ |
||
160 | public function getSequences () |
||
169 | |||
170 | /** |
||
171 | * @return bool |
||
172 | */ |
||
173 | public function hasSequences () |
||
182 | |||
183 | /** |
||
184 | * @return \Classes\Db\Column[] |
||
185 | */ |
||
186 | public function getColumns () |
||
190 | |||
191 | /** |
||
192 | * @return string |
||
193 | */ |
||
194 | public function getName () |
||
198 | |||
199 | /** |
||
200 | * @return string |
||
201 | */ |
||
202 | public function getSchema () |
||
206 | |||
207 | /** |
||
208 | * @return bool |
||
209 | */ |
||
210 | public function hasSchema () |
||
214 | |||
215 | /** |
||
216 | * @return string |
||
217 | */ |
||
218 | public function getDatabase () |
||
222 | |||
223 | /** |
||
224 | * @return string |
||
225 | */ |
||
226 | public function getNamespace () |
||
230 | |||
231 | /** |
||
232 | * @param string $Namespace |
||
|
|||
233 | */ |
||
234 | public function setNamespace ( $namespace ) |
||
238 | |||
239 | } |
||
240 |
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.