Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
18 | public static function sqlCall(string $sqlMethod, ...$params): Expression |
||
19 | { |
||
20 | 3 | $expressions = implode(', ', array_map(function ($expression) { |
|
21 | 3 | return "({$expression})"; |
|
22 | 3 | }, (array)$params)); |
|
23 | |||
24 | 3 | $command = "{$sqlMethod}({$expressions})"; |
|
25 | |||
26 | 3 | return new Expression($command); |
|
27 | } |
||
28 | |||
62 | } |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: