1 | <?php |
||
2 | |||
3 | namespace eloquentFilter\QueryFilter\Detection\ConditionsDetect\Eloquent; |
||
4 | |||
5 | use eloquentFilter\QueryFilter\Detection\Contract\DetectorConditionsContract; |
||
6 | use eloquentFilter\QueryFilter\Queries\WhereCustom; |
||
7 | |||
8 | /** |
||
9 | * Class WhereCustomCondition. |
||
10 | */ |
||
11 | class WhereCustomCondition implements DetectorConditionsContract |
||
12 | { |
||
13 | /** |
||
14 | * @param $field |
||
15 | * @param $params |
||
16 | * @param bool $is_override_method |
||
17 | * |
||
18 | * @return string|null |
||
19 | */ |
||
20 | public static function detect($field, $params, bool $is_override_method = false): ?string |
||
21 | { |
||
22 | if ($is_override_method == true) { |
||
0 ignored issues
–
show
|
|||
23 | $method = WhereCustom::class; |
||
24 | } |
||
25 | |||
26 | return $method ?? null; |
||
27 | } |
||
28 | } |
||
29 |
When comparing two booleans, it is generally considered safer to use the strict comparison operator.