1 | <?php |
||
17 | class Builder extends IlluminateQueryBuilder |
||
18 | { |
||
19 | /** |
||
20 | * @var Grammar |
||
21 | */ |
||
22 | public $grammar; |
||
23 | |||
24 | /** |
||
25 | * @var Connection |
||
26 | */ |
||
27 | public $connection; |
||
28 | |||
29 | /** |
||
30 | * @var QueryBuilder |
||
31 | */ |
||
32 | public $aqb; |
||
33 | |||
34 | /** |
||
35 | * Alias' are AQL variables |
||
36 | * Sticking with the SQL based naming as this is the Laravel driver. |
||
37 | * @var QueryBuilder |
||
38 | */ |
||
39 | protected $aliasRegistry = []; |
||
40 | |||
41 | /** |
||
42 | * @override |
||
43 | * Create a new query builder instance. |
||
44 | * |
||
45 | * @param ConnectionInterface $connection |
||
46 | * @param Grammar $grammar |
||
47 | * @param Processor $processor |
||
48 | * @param QueryBuilder|null $aqb |
||
49 | */ |
||
50 | public function __construct(ConnectionInterface $connection, |
||
63 | |||
64 | /** |
||
65 | * Run the query as a "select" statement against the connection. |
||
66 | * |
||
67 | * @return array |
||
68 | */ |
||
69 | protected function runSelect() |
||
76 | |||
77 | /** |
||
78 | * Get the SQL representation of the query. |
||
79 | * |
||
80 | * @return string |
||
81 | */ |
||
82 | public function toSql() |
||
86 | |||
87 | /** |
||
88 | * Insert a new record into the database. |
||
89 | * @param array $values |
||
90 | * @return bool |
||
91 | * @throws BindException |
||
92 | */ |
||
93 | public function insert(array $values) : bool |
||
100 | |||
101 | /** |
||
102 | * Insert a new record and get the value of the primary key. |
||
103 | * |
||
104 | * @param array $values |
||
105 | * @param string|null $sequence |
||
106 | * @return int |
||
107 | * @throws BindException |
||
108 | */ |
||
109 | public function insertGetId(array $values, $sequence = null) |
||
116 | |||
117 | /** |
||
118 | * Execute the query as a "select" statement. |
||
119 | * |
||
120 | * @param array|string $columns |
||
121 | * @return Collection |
||
122 | */ |
||
123 | public function get($columns = ['*']) |
||
131 | |||
132 | /** |
||
133 | * Update a record in the database. |
||
134 | * |
||
135 | * @param array $values |
||
136 | * @return int |
||
137 | */ |
||
138 | public function update(array $values) |
||
145 | |||
146 | /** |
||
147 | * Delete a record from the database. |
||
148 | * |
||
149 | * @param mixed $_key |
||
150 | * @return int |
||
151 | */ |
||
152 | public function delete($_key = null) |
||
159 | |||
160 | public function registerAlias(string $table, string $alias) : void |
||
164 | |||
165 | public function getAlias(string $table) : string |
||
169 | |||
170 | /** |
||
171 | * Execute an aggregate function on the database. |
||
172 | * |
||
173 | * @param string $function |
||
174 | * @param array $columns |
||
175 | * @return mixed |
||
176 | */ |
||
177 | public function aggregate($function, $columns = ['*']) |
||
188 | |||
189 | /** |
||
190 | * Add a basic where clause to the query. |
||
191 | * |
||
192 | * @param Closure|string|array $column |
||
193 | * @param mixed $operator |
||
194 | * @param mixed $value |
||
195 | * @param string $boolean |
||
196 | * @return Builder |
||
197 | */ |
||
198 | public function where($column, $operator = null, $value = null, $boolean = 'and') |
||
261 | |||
262 | /** |
||
263 | * Determine if the given operator is supported. |
||
264 | * |
||
265 | * @param string $operator |
||
266 | * @return bool |
||
267 | */ |
||
268 | protected function invalidOperator($operator) |
||
273 | |||
274 | /** |
||
275 | * Add an "or where" clause to the query. |
||
276 | * |
||
277 | * @param Closure|string|array $column |
||
278 | * @param mixed $operator |
||
279 | * @param mixed $value |
||
280 | * @return IlluminateQueryBuilder|static |
||
281 | */ |
||
282 | public function orWhere($column, $operator = null, $value = null) |
||
286 | |||
287 | /** |
||
288 | * Add an "order by" clause to the query. |
||
289 | * |
||
290 | * @param Closure|IlluminateQueryBuilder|string $column |
||
291 | * @param string $direction |
||
292 | * @return $this |
||
293 | * |
||
294 | * @throws InvalidArgumentException |
||
295 | */ |
||
296 | public function orderBy($column, $direction = 'asc') |
||
311 | |||
312 | /** |
||
313 | * Add a raw "order by" clause to the query. |
||
314 | * |
||
315 | * @param \LaravelFreelancerNL\FluentAQL\Expressions\FunctionExpression $aql |
||
316 | * @param array $bindings |
||
317 | * @return $this |
||
318 | */ |
||
319 | public function orderByRaw($aql, $bindings = []) |
||
327 | |||
328 | /** |
||
329 | * Put the query's results in random order. |
||
330 | * |
||
331 | * @param string $seed |
||
332 | * @return $this |
||
333 | */ |
||
334 | public function inRandomOrder($seed = '') |
||
338 | } |
||
339 |
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.