Failed Conditions
Push — refactor/improve-static-analys... ( 45b897...d71351 )
by Bas
05:25
created

BuildsWheres::mergeWheres()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
c 0
b 0
f 0
nc 1
nop 2
dl 0
loc 7
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace LaravelFreelancerNL\Aranguent\Query\Concerns;
6
7
use Carbon\CarbonPeriod;
8
use Closure;
9
use Illuminate\Contracts\Database\Query\ConditionExpression;
10
use Illuminate\Contracts\Database\Query\Expression as ExpressionContract;
11
use Illuminate\Contracts\Support\Arrayable;
12
use Illuminate\Database\Eloquent\Builder as IlluminateEloquentBuilder;
13
use Illuminate\Database\Query\Builder as IlluminateQueryBuilder;
14
use Illuminate\Database\Query\Expression;
15
use Illuminate\Support\Arr;
16
use InvalidArgumentException;
17
use LaravelFreelancerNL\Aranguent\Query\Builder;
18
use LogicException;
19
20
trait BuildsWheres
21
{
22
    /**
23
     * Add a "where fulltext" clause to the query.
24
     *
25
     * @param  string|string[]  $columns
26
     * @param  string  $value
27
     * @param  string  $boolean
28
     * @return $this
29
     */
30
    public function whereFullText($columns, $value, array $options = [], $boolean = 'and')
31
    {
32
        // NOTE: can be done by listing all fulltext calls and using it on the collection name from $builder->from
33
        // distinctly merging results from multiple calls on the same collection.
34
        // For a call on a joined collection it might need to be moved to the JoinClause
35
        throw new LogicException('This database driver does not support the whereFullText method.');
36
    }
37
38
    /**
39
     * Prepare the value and operator for a where clause.
40
     *
41
     * @param  string  $value
42
     * @param  string  $operator
43
     * @param  bool  $useDefault
44
     * @return array
45
     *
46
     * @throws \InvalidArgumentException
47
     */
48
    public function prepareValueAndOperator($value, $operator, $useDefault = false)
49
    {
50
        if ($useDefault) {
51
            return [$operator, '=='];
52
        } elseif ($this->invalidOperatorAndValue($operator, $value)) {
0 ignored issues
show
Bug introduced by
It seems like invalidOperatorAndValue() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

52
        } elseif ($this->/** @scrutinizer ignore-call */ invalidOperatorAndValue($operator, $value)) {
Loading history...
53
            throw new InvalidArgumentException('Illegal operator and value combination.');
54
        }
55
56
        return [$value, $operator];
57
    }
58
59
    /**
60
     * Add an array of where clauses to the query.
61
     *
62
     * @param  array  $column
63
     * @param  string  $boolean
64
     * @param  string  $method
65
     * @return $this
66
     */
67
    protected function addArrayOfWheres($column, $boolean, $method = 'where')
68
    {
69
        $column = associativeFlatten($column);
70
71
        return $this->whereNested(function ($query) use ($column, $method, $boolean) {
0 ignored issues
show
Bug introduced by
The method whereNested() does not exist on LaravelFreelancerNL\Aran...y\Concerns\BuildsWheres. Did you maybe mean where()? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

71
        return $this->/** @scrutinizer ignore-call */ whereNested(function ($query) use ($column, $method, $boolean) {

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
72
            foreach ($column as $key => $value) {
73
                $query->{$method}($key, '==', $value, $boolean);
74
            }
75
        }, $boolean);
76
    }
77
78
    /**
79
     * Add a date based (year, month, day, time) statement to the query.
80
     *
81
     * @param  string  $type
82
     * @param  string  $column
83
     * @param  string  $operator
84
     * @param  mixed  $value
85
     * @param  string  $boolean
86
     * @return IlluminateQueryBuilder
87
     */
88
    protected function addDateBasedWhere($type, $column, $operator, $value, $boolean = 'and')
89
    {
90
        $value = $this->bindValue($value);
0 ignored issues
show
Bug introduced by
It seems like bindValue() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

90
        /** @scrutinizer ignore-call */ 
91
        $value = $this->bindValue($value);
Loading history...
91
92
        $this->wheres[] = compact('column', 'type', 'boolean', 'operator', 'value');
0 ignored issues
show
Bug Best Practice introduced by
The property wheres does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
93
94
        return $this;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this returns the type LaravelFreelancerNL\Aran...y\Concerns\BuildsWheres which is incompatible with the documented return type Illuminate\Database\Query\Builder.
Loading history...
95
    }
96
97
98
    /**
99
     * Add another query builder as a nested where to the query builder.
100
     *
101
     * @param  \Illuminate\Database\Query\Builder  $query
102
     * @param  string  $boolean
103
     * @return $this
104
     */
105
    public function addNestedWhereQuery($query, $boolean = 'and')
106
    {
107
        if (count($query->wheres)) {
108
            $type = 'Nested';
109
110
            $this->wheres[] = compact('type', 'query', 'boolean');
0 ignored issues
show
Bug Best Practice introduced by
The property wheres does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
111
            $this->importBindings($query);
0 ignored issues
show
Bug introduced by
It seems like importBindings() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

111
            $this->/** @scrutinizer ignore-call */ 
112
                   importBindings($query);
Loading history...
112
        }
113
114
        return $this;
115
    }
116
117
    /**
118
     * Add an exists clause to the query.
119
     *
120
     * @param  \Illuminate\Database\Query\Builder  $query
121
     * @param  string  $boolean
122
     * @param  bool  $not
123
     * @return $this
124
     */
125
    public function addWhereExistsQuery(IlluminateQueryBuilder $query, $boolean = 'and', $not = false)
126
    {
127
        $type = $not ? 'NotExists' : 'Exists';
128
129
        [$subquery] = $this->parseSub($query);
0 ignored issues
show
Bug introduced by
It seems like parseSub() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

129
        /** @scrutinizer ignore-call */ 
130
        [$subquery] = $this->parseSub($query);
Loading history...
130
131
        $this->wheres[] = compact('type', 'subquery', 'boolean');
0 ignored issues
show
Bug Best Practice introduced by
The property wheres does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
132
133
        return $this;
134
    }
135
136
    /**
137
     * Merge an array of where clauses and bindings.
138
     *
139
     * @param  array  $wheres
140
     * @param  array  $bindings
141
     * @return $this
142
     */
143
    public function mergeWheres($wheres, $bindings)
144
    {
145
        $this->wheres = array_merge($this->wheres, (array) $wheres);
0 ignored issues
show
Bug Best Practice introduced by
The property wheres does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
146
147
        $this->bindings['where'] = array_merge($this->bindings['where'], (array) $bindings);
0 ignored issues
show
Bug Best Practice introduced by
The property bindings does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
148
149
        return $this;
150
    }
151
152
    /**
153
     * Add a basic where clause to the query.
154
     *
155
     * @param  \Closure|IlluminateQueryBuilder|IlluminateEloquentBuilder|Expression|string|array  $column
156
     * @param  mixed  $operator
157
     * @param  mixed  $value
158
     * @param  string  $boolean
159
     * @return IlluminateQueryBuilder
160
     */
161
    public function where($column, $operator = null, $value = null, $boolean = 'and')
162
    {
163
        if ($column instanceof ConditionExpression) {
164
            $type = 'Expression';
165
166
            $this->wheres[] = compact('type', 'column', 'boolean');
0 ignored issues
show
Bug Best Practice introduced by
The property wheres does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
167
168
            return $this;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this returns the type LaravelFreelancerNL\Aran...y\Concerns\BuildsWheres which is incompatible with the documented return type Illuminate\Database\Query\Builder.
Loading history...
169
        }
170
171
        // If the column is an array, we will assume it is an array of key-value pairs
172
        // and can add them each as a where clause. We will maintain the boolean we
173
        // received when the method was called and pass it into the nested where.
174
        if (is_array($column) && !array_is_list($column)) {
175
            return $this->addArrayOfWheres($column, $boolean);
176
        }
177
178
        // Here we will make some assumptions about the operator. If only 2 values are
179
        // passed to the method, we will assume that the operator is an equals sign
180
        // and keep going. Otherwise, we'll require the operator to be passed in.
181
        [$value, $operator] = $this->prepareValueAndOperator(
182
            $value,
183
            $operator,
184
            func_num_args() === 2
185
        );
186
187
        // If the column is actually a Closure instance, we will assume the developer
188
        // wants to begin a nested where statement which is wrapped in parentheses.
189
        // We will add that Closure to the query and return back out immediately.
190
        if ($column instanceof Closure && is_null($operator)) {
191
            return $this->whereNested($column, $boolean);
192
        }
193
194
        // If the column is a Closure instance and there is an operator value, we will
195
        // assume the developer wants to run a subquery and then compare the result
196
        // of that subquery with the given value that was provided to the method.
197
        if ($this->isQueryable($column) && !is_null($operator)) {
0 ignored issues
show
Bug introduced by
It seems like isQueryable() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

197
        if ($this->/** @scrutinizer ignore-call */ isQueryable($column) && !is_null($operator)) {
Loading history...
198
            [$subquery, $bindings] = $this->createSub($column, true);
0 ignored issues
show
Bug introduced by
It seems like createSub() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

198
            /** @scrutinizer ignore-call */ 
199
            [$subquery, $bindings] = $this->createSub($column, true);
Loading history...
199
200
            return $this->where(new Expression($subquery), $operator, $value, $boolean);
201
        }
202
203
        // If the given operator is not found in the list of valid operators we will
204
        // assume that the developer is just short-cutting the '==' operators and
205
        // we will set the operators to '==' and set the values appropriately.
206
        if ($this->invalidOperator($operator)) {
0 ignored issues
show
Bug introduced by
It seems like invalidOperator() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

206
        if ($this->/** @scrutinizer ignore-call */ invalidOperator($operator)) {
Loading history...
207
            [$value, $operator] = [$operator, '=='];
208
        }
209
210
        // If the value is a Closure, it means the developer is performing an entire
211
        // sub-select within the query and we will need to compile the sub-select
212
        // within the where clause to get the appropriate query record results.
213
        if ($this->isQueryable($value)) {
214
            return $this->whereSub($column, $operator, $value, $boolean);
215
        }
216
217
        // If the value is "null", we will just assume the developer wants to add a
218
        // where null clause to the query. So, we will allow a short-cut here to
219
        // that method for convenience so the developer doesn't have to check.
220
        if (is_null($value)) {
221
            return $this->whereNull($column, $boolean, $operator !== '==');
0 ignored issues
show
Bug introduced by
The method whereNull() does not exist on LaravelFreelancerNL\Aran...y\Concerns\BuildsWheres. Did you maybe mean where()? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

221
            return $this->/** @scrutinizer ignore-call */ whereNull($column, $boolean, $operator !== '==');

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
222
        }
223
224
        $type = 'Basic';
225
226
        $columnString = ($column instanceof ExpressionContract)
227
            ? $this->grammar->getValue($column)
228
            : $column;
229
230
        // If the column is making a JSON reference we'll check to see if the value
231
        // is a boolean. If it is, we'll add the raw boolean string as an actual
232
        // value to the query to ensure this is properly handled by the query.
233
        if (str_contains($columnString, '->') && is_bool($value)) {
234
            $value = new Expression($value ? 'true' : 'false');
235
236
            if (is_string($column)) {
237
                $type = 'JsonBoolean';
238
            }
239
        }
240
241
        if ($this->isBitwiseOperator($operator)) {
0 ignored issues
show
Bug introduced by
It seems like isBitwiseOperator() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

241
        if ($this->/** @scrutinizer ignore-call */ isBitwiseOperator($operator)) {
Loading history...
242
            $type = 'Bitwise';
243
        }
244
245
        if (
246
            !$value instanceof ExpressionContract
247
            && !$this->isReference($value)
0 ignored issues
show
Bug introduced by
It seems like isReference() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

247
            && !$this->/** @scrutinizer ignore-call */ isReference($value)
Loading history...
248
        ) {
249
            $value = $this->bindValue($value);
250
        }
251
252
        // Now that we are working with just a simple query we can put the elements
253
        // in our array and add the query binding to our array of bindings that
254
        // will be bound to each SQL statements when it is finally executed.
255
        $this->wheres[] = compact(
256
            'type',
257
            'column',
258
            'operator',
259
            'value',
260
            'boolean'
261
        );
262
263
        return $this;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this returns the type LaravelFreelancerNL\Aran...y\Concerns\BuildsWheres which is incompatible with the documented return type Illuminate\Database\Query\Builder.
Loading history...
264
    }
265
266
    /**
267
     * Add a where between statement to the query.
268
     *
269
     * @param  string|Expression  $column
270
     * @param  string  $boolean
271
     * @param  bool  $not
272
     * @return IlluminateQueryBuilder
273
     */
274
    public function whereBetween($column, iterable $values, $boolean = 'and', $not = false)
275
    {
276
        $type = 'between';
277
278
        if ($values instanceof CarbonPeriod) {
279
            $values = $values->toArray();
280
        }
281
282
        $values = array_slice($this->cleanBindings(Arr::flatten($values)), 0, 2);
0 ignored issues
show
Bug introduced by
It seems like cleanBindings() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

282
        $values = array_slice($this->/** @scrutinizer ignore-call */ cleanBindings(Arr::flatten($values)), 0, 2);
Loading history...
283
        $values[0] = $this->bindValue($values[0]);
284
        $values[1] = $this->bindValue($values[1]);
285
286
        $this->wheres[] = compact('type', 'column', 'values', 'boolean', 'not');
0 ignored issues
show
Bug Best Practice introduced by
The property wheres does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
287
288
        return $this;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this returns the type LaravelFreelancerNL\Aran...y\Concerns\BuildsWheres which is incompatible with the documented return type Illuminate\Database\Query\Builder.
Loading history...
289
    }
290
291
    /**
292
     * Add a "where" clause comparing two columns to the query.
293
     *
294
     * @param  string|array  $first
295
     * @param  string|null  $operator
296
     * @param  string|null  $second
297
     * @param  string|null  $boolean
298
     * @return $this
299
     */
300
    public function whereColumn($first, $operator = null, $second = null, $boolean = 'and')
301
    {
302
        // If the column is an array, we will assume it is an array of key-value pairs
303
        // and can add them each as a where clause. We will maintain the boolean we
304
        // received when the method was called and pass it into the nested where.
305
        if (is_array($first) && !array_is_list($first)) {
306
            return $this->addArrayOfWheres($first, $boolean, 'whereColumn');
307
        }
308
309
        // If the given operator is not found in the list of valid operators we will
310
        // assume that the developer is just short-cutting the '=' operators and
311
        // we will set the operators to '=' and set the values appropriately.
312
        if ($this->invalidOperator($operator)) {
313
            [$second, $operator] = [$operator, '='];
314
        }
315
316
        // Finally, we will add this where clause into this array of clauses that we
317
        // are building for the query. All of them will be compiled via a grammar
318
        // once the query is about to be executed and run against the database.
319
        $type = 'Column';
320
321
        $this->wheres[] = compact(
0 ignored issues
show
Bug Best Practice introduced by
The property wheres does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
322
            'type',
323
            'first',
324
            'operator',
325
            'second',
326
            'boolean'
327
        );
328
329
        return $this;
330
    }
331
332
333
    /**
334
     * Add a "where in" clause to the query.
335
     *
336
     * @param  string  $column
337
     * @param  mixed  $values
338
     * @param  string  $boolean
339
     * @param  bool  $not
340
     * @return IlluminateQueryBuilder
341
     */
342
    public function whereIn($column, $values, $boolean = 'and', $not = false)
343
    {
344
        $type = $not ? 'NotIn' : 'In';
345
346
        // If the value is a query builder instance we will assume the developer wants to
347
        // look for any values that exist within this given query. So, we will add the
348
        // query accordingly so that this query is properly executed when it is run.
349
        if ($this->isQueryable($values)) {
350
            [$query, $bindings] = $this->createSub($values);
351
352
            $values = [new Expression($query)];
353
354
            $this->addBinding($bindings, 'where');
0 ignored issues
show
Bug introduced by
It seems like addBinding() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

354
            $this->/** @scrutinizer ignore-call */ 
355
                   addBinding($bindings, 'where');
Loading history...
355
        }
356
357
        // Next, if the value is Arrayable we need to cast it to its raw array form so we
358
        // have the underlying array value instead of an Arrayable object which is not
359
        // able to be added as a binding, etc. We will then add to the wheres array.
360
        if ($values instanceof Arrayable) {
361
            $values = $values->toArray();
362
        }
363
364
        $values = $this->bindValue($this->cleanBindings($values));
365
366
        $this->wheres[] = compact('type', 'column', 'values', 'boolean');
0 ignored issues
show
Bug Best Practice introduced by
The property wheres does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
367
368
        return $this;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this returns the type LaravelFreelancerNL\Aran...y\Concerns\BuildsWheres which is incompatible with the documented return type Illuminate\Database\Query\Builder.
Loading history...
369
    }
370
371
    /**
372
     * Add a "where JSON contains" clause to the query.
373
     *
374
     * @SuppressWarnings(PHPMD.BooleanArgumentFlag)
375
     *
376
     * @param  string  $column
377
     * @param  mixed  $value
378
     * @param  string  $boolean
379
     * @param  bool  $not
380
     * @return IlluminateQueryBuilder
381
     */
382
    public function whereJsonContains($column, $value, $boolean = 'and', $not = false)
383
    {
384
        $type = 'JsonContains';
385
386
        $value = $this->bindValue($value);
387
388
        $this->wheres[] = compact('type', 'column', 'value', 'boolean', 'not');
0 ignored issues
show
Bug Best Practice introduced by
The property wheres does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
389
390
        return $this;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this returns the type LaravelFreelancerNL\Aran...y\Concerns\BuildsWheres which is incompatible with the documented return type Illuminate\Database\Query\Builder.
Loading history...
391
    }
392
393
    /**
394
     * Add a "where JSON length" clause to the query.
395
     *
396
     * @param  string  $column
397
     * @param  mixed  $operator
398
     * @param  mixed  $value
399
     * @param  string  $boolean
400
     * @return IlluminateQueryBuilder
401
     */
402
    public function whereJsonLength($column, $operator, $value = null, $boolean = 'and')
403
    {
404
        $type = 'JsonLength';
405
406
        [$value, $operator] = $this->prepareValueAndOperator(
407
            $value,
408
            $operator,
409
            func_num_args() === 2
410
        );
411
412
        $value = $this->bindValue((int) $this->flattenValue($value));
0 ignored issues
show
Bug introduced by
It seems like flattenValue() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

412
        $value = $this->bindValue((int) $this->/** @scrutinizer ignore-call */ flattenValue($value));
Loading history...
413
414
        $this->wheres[] = compact('type', 'column', 'operator', 'value', 'boolean');
0 ignored issues
show
Bug Best Practice introduced by
The property wheres does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
415
416
        return $this;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this returns the type LaravelFreelancerNL\Aran...y\Concerns\BuildsWheres which is incompatible with the documented return type Illuminate\Database\Query\Builder.
Loading history...
417
    }
418
419
    /**
420
     * Add a full sub-select to the query.
421
     *
422
     * @param  \Illuminate\Contracts\Database\Query\Expression|string  $column
423
     * @param  string  $operator
424
     * @param  \Closure|\Illuminate\Database\Query\Builder|IlluminateEloquentBuilder $callback
425
     * @param  string  $boolean
426
     * @return $this
427
     */
428
    protected function whereSub($column, $operator, $callback, $boolean)
429
    {
430
        assert($this instanceof Builder);
431
432
        $type = 'Sub';
433
434
        // Once we have the query instance we can simply execute it so it can add all
435
        // of the sub-select's conditions to itself, and then we can cache it off
436
        // in the array of where clauses for the "main" parent query instance.
437
        call_user_func($callback, $query = $this->forSubQuery());
0 ignored issues
show
Bug introduced by
It seems like $callback can also be of type Illuminate\Database\Eloquent\Builder and Illuminate\Database\Query\Builder; however, parameter $callback of call_user_func() does only seem to accept callable, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

437
        call_user_func(/** @scrutinizer ignore-type */ $callback, $query = $this->forSubQuery());
Loading history...
438
439
        assert($query instanceof Builder);
440
441
        $query->returnSingleValue = true;
442
443
        [$subquery] = $this->parseSub($query);
444
445
        $this->wheres[] = compact(
446
            'type',
447
            'column',
448
            'operator',
449
            'subquery',
450
            'boolean'
451
        );
452
453
        return $this;
454
    }
455
}
456