1 | <?php |
||
5 | class QueryObject |
||
6 | { |
||
7 | /** |
||
8 | * @var array |
||
9 | */ |
||
10 | protected $selects; |
||
11 | |||
12 | /** |
||
13 | * @var array |
||
14 | */ |
||
15 | protected $wheres; |
||
16 | |||
17 | /** |
||
18 | * @var array |
||
19 | */ |
||
20 | protected $whereIns; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $orderBy; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $orderByDirection = 'asc'; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $dimension = 'multi'; |
||
36 | |||
37 | /** |
||
38 | * Limit of records to bring back |
||
39 | * |
||
40 | * @var integer |
||
41 | */ |
||
42 | protected $limit = null; |
||
43 | |||
44 | /** |
||
45 | * Place to set special workaround flags |
||
46 | * |
||
47 | * @var string|array |
||
48 | */ |
||
49 | protected $flags; |
||
50 | |||
51 | /** |
||
52 | * Adds select statement parameters to the object |
||
53 | * Expects a string column name, which is then looped through |
||
54 | * in the array and added to. |
||
55 | * e.g. $queryObject->addSelect('COUNT(ResultID) AS COUNT'); |
||
56 | * |
||
57 | * @param string $string |
||
|
|||
58 | */ |
||
59 | public function addSelect($array) |
||
63 | |||
64 | /** |
||
65 | * Gets the select statement parameters out of the object |
||
66 | * |
||
67 | * @return array |
||
68 | */ |
||
69 | public function getSelects() |
||
73 | |||
74 | /** |
||
75 | * Adds where statements to the object |
||
76 | * |
||
77 | * @param array $array |
||
78 | */ |
||
79 | public function addWhere(array $array) |
||
83 | |||
84 | /** |
||
85 | * Pulls out the array for the where statements |
||
86 | * |
||
87 | * @return array |
||
88 | */ |
||
89 | public function getWheres() |
||
93 | |||
94 | /** |
||
95 | * Adds where statements to the object |
||
96 | * |
||
97 | * @param array $array |
||
98 | */ |
||
99 | public function addWhereIn(array $array) |
||
103 | |||
104 | /** |
||
105 | * Pulls out the array for the where statements |
||
106 | * |
||
107 | * @return array |
||
108 | */ |
||
109 | public function getWhereIns() |
||
113 | |||
114 | /** |
||
115 | * Set order by column |
||
116 | * |
||
117 | * @param string $string [description] |
||
118 | */ |
||
119 | public function setOrderBy($string) |
||
125 | |||
126 | /** |
||
127 | * Get order by column |
||
128 | * |
||
129 | * @return string |
||
130 | */ |
||
131 | public function getOrderBy() |
||
135 | |||
136 | /** |
||
137 | * Set asc or desc |
||
138 | * |
||
139 | * @param string $string |
||
140 | */ |
||
141 | public function setOrderByDirection($string) |
||
147 | |||
148 | /** |
||
149 | * Gets order by direction |
||
150 | * |
||
151 | * @return string |
||
152 | */ |
||
153 | public function getOrderByDirection() |
||
157 | |||
158 | /** |
||
159 | * Set array dimension level |
||
160 | * |
||
161 | * @param string $string |
||
162 | */ |
||
163 | public function setDimension($string) |
||
169 | |||
170 | /** |
||
171 | * Gets array dimension level |
||
172 | * |
||
173 | * @return string |
||
174 | */ |
||
175 | public function getDimension() |
||
179 | |||
180 | /** |
||
181 | * Sets the limit of records to bring back |
||
182 | * |
||
183 | * @param integer $limit |
||
184 | */ |
||
185 | public function setLimit($limit) |
||
191 | |||
192 | /** |
||
193 | * Gets the limit of records |
||
194 | * |
||
195 | * @return integer |
||
196 | */ |
||
197 | public function getLimit() |
||
201 | |||
202 | /** |
||
203 | * Allows setting of workaround flags |
||
204 | * |
||
205 | * @param array|string $flags |
||
206 | */ |
||
207 | public function setFlags($flags) |
||
213 | |||
214 | /** |
||
215 | * Retreives workaround flags |
||
216 | * |
||
217 | * @return array|string |
||
218 | */ |
||
219 | public function getFlags() |
||
223 | } |
||
224 |
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.