1 | <?php |
||
18 | class Builder extends IlluminateQueryBuilder |
||
19 | { |
||
20 | /** |
||
21 | * @var Grammar |
||
22 | */ |
||
23 | public $grammar; |
||
24 | |||
25 | /** |
||
26 | * @var Connection |
||
27 | */ |
||
28 | public $connection; |
||
29 | |||
30 | /** |
||
31 | * @var QueryBuilder |
||
32 | */ |
||
33 | public $aqb; |
||
34 | |||
35 | /** |
||
36 | * Alias' are AQL variables |
||
37 | * Sticking with the SQL based naming as this is the Laravel driver. |
||
38 | * @var QueryBuilder |
||
39 | */ |
||
40 | protected $aliasRegistry = []; |
||
41 | |||
42 | /** |
||
43 | * @override |
||
44 | * Create a new query builder instance. |
||
45 | * |
||
46 | * @param ConnectionInterface $connection |
||
47 | * @param Grammar $grammar |
||
48 | * @param Processor $processor |
||
49 | * @param QueryBuilder|null $aqb |
||
50 | */ |
||
51 | public function __construct(ConnectionInterface $connection, |
||
64 | |||
65 | /** |
||
66 | * Run the query as a "select" statement against the connection. |
||
67 | * |
||
68 | * @return array |
||
69 | */ |
||
70 | protected function runSelect() |
||
77 | |||
78 | /** |
||
79 | * Get the SQL representation of the query. |
||
80 | * |
||
81 | * @return string |
||
82 | */ |
||
83 | public function toSql() |
||
87 | |||
88 | /** |
||
89 | * Insert a new record into the database. |
||
90 | * @param array $values |
||
91 | * @return bool |
||
92 | * @throws BindException |
||
93 | */ |
||
94 | public function insert(array $values) : bool |
||
101 | |||
102 | /** |
||
103 | * Insert a new record and get the value of the primary key. |
||
104 | * |
||
105 | * @param array $values |
||
106 | * @param string|null $sequence |
||
107 | * @return int |
||
108 | * @throws BindException |
||
109 | */ |
||
110 | public function insertGetId(array $values, $sequence = null) |
||
117 | |||
118 | /** |
||
119 | * Execute the query as a "select" statement. |
||
120 | * |
||
121 | * @param array|string $columns |
||
122 | * @return Collection |
||
123 | */ |
||
124 | public function get($columns = ['*']) |
||
132 | |||
133 | /** |
||
134 | * Update a record in the database. |
||
135 | * |
||
136 | * @param array $values |
||
137 | * @return int |
||
138 | */ |
||
139 | public function update(array $values) |
||
146 | |||
147 | /** |
||
148 | * Delete a record from the database. |
||
149 | * |
||
150 | * @param mixed $_key |
||
151 | * @return int |
||
152 | */ |
||
153 | public function delete($_key = null) |
||
160 | |||
161 | public function registerAlias(string $table, string $alias) : void |
||
165 | |||
166 | public function getAlias(string $table) : string |
||
170 | |||
171 | /** |
||
172 | * Execute an aggregate function on the database. |
||
173 | * |
||
174 | * @param string $function |
||
175 | * @param array $columns |
||
176 | * @return mixed |
||
177 | */ |
||
178 | public function aggregate($function, $columns = ['*']) |
||
189 | |||
190 | /** |
||
191 | * Add a basic where clause to the query. |
||
192 | * |
||
193 | * @param Closure|string|array $column |
||
194 | * @param mixed $operator |
||
195 | * @param mixed $value |
||
196 | * @param string $boolean |
||
197 | * @return Builder |
||
198 | */ |
||
199 | public function where($column, $operator = null, $value = null, $boolean = 'and') |
||
262 | |||
263 | /** |
||
264 | * Determine if the given operator is supported. |
||
265 | * |
||
266 | * @param string $operator |
||
267 | * @return bool |
||
268 | */ |
||
269 | protected function invalidOperator($operator) |
||
274 | |||
275 | /** |
||
276 | * Add an "or where" clause to the query. |
||
277 | * |
||
278 | * @param Closure|string|array $column |
||
279 | * @param mixed $operator |
||
280 | * @param mixed $value |
||
281 | * @return IlluminateQueryBuilder|static |
||
282 | */ |
||
283 | public function orWhere($column, $operator = null, $value = null) |
||
287 | |||
288 | /** |
||
289 | * Add an "order by" clause to the query. |
||
290 | * |
||
291 | * @param Closure|IlluminateQueryBuilder|string $column |
||
292 | * @param string $direction |
||
293 | * @return $this |
||
294 | * |
||
295 | * @throws InvalidArgumentException |
||
296 | */ |
||
297 | public function orderBy($column, $direction = 'asc') |
||
312 | |||
313 | /** |
||
314 | * Add a raw "order by" clause to the query. |
||
315 | * |
||
316 | * @param string|ExpressionInterface $aql |
||
317 | * @param array $bindings |
||
318 | * @return $this |
||
319 | */ |
||
320 | public function orderByRaw($aql, $bindings = []) |
||
328 | |||
329 | /** |
||
330 | * Put the query's results in random order. |
||
331 | * |
||
332 | * @param string $seed |
||
333 | * @return $this |
||
334 | */ |
||
335 | public function inRandomOrder($seed = '') |
||
339 | } |
||
340 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.