@@ -126,8 +126,10 @@ public static function evaluate(
126
126
&& \preg_match ('/^[0-9]{2,4}-[0-1][0-9]-[0-3][0-9]$/ ' , $ r_value )
127
127
) {
128
128
$ r_value .= ' 00:00:00 ' ;
129
- } elseif (\preg_match ('/^[0-9]{2,4}-[0-1][0-9]-[0-3][0-9] [0-2][0-9]:[0-5][0-9]:[0-5][0-9]$/ ' , $ r_value )
130
- && \preg_match ('/^[0-9]{2,4}-[0-1][0-9]-[0-3][0-9]$/ ' , $ l_value )
129
+ } elseif (\preg_match (
130
+ '/^[0-9]{2,4}-[0-1][0-9]-[0-3][0-9] [0-2][0-9]:[0-5][0-9]:[0-5][0-9]$/ ' ,
131
+ $ r_value
132
+ ) && \preg_match ('/^[0-9]{2,4}-[0-1][0-9]-[0-3][0-9]$/ ' , $ l_value )
131
133
) {
132
134
$ l_value .= ' 00:00:00 ' ;
133
135
}
@@ -142,7 +144,8 @@ public static function evaluate(
142
144
switch ($ expr ->operator ) {
143
145
case '= ' :
144
146
if ($ as_string ) {
145
- return \strtolower ((string ) $ l_value ) === \strtolower ((string ) $ r_value ) ? 1 : 0 ^ $ expr ->negatedInt ;
147
+ return (\strtolower ((string ) $ l_value ) === \strtolower ((string ) $ r_value ) ? 1 : 0 )
148
+ ^ $ expr ->negatedInt ;
146
149
}
147
150
148
151
if (empty ($ l_value ) && empty ($ r_value )) {
@@ -154,7 +157,8 @@ public static function evaluate(
154
157
case '<> ' :
155
158
case '!= ' :
156
159
if ($ as_string ) {
157
- return \strtolower ((string ) $ l_value ) !== \strtolower ((string ) $ r_value ) ? 1 : 0 ^ $ expr ->negatedInt ;
160
+ return (\strtolower ((string ) $ l_value ) !== \strtolower ((string ) $ r_value ) ? 1 : 0 )
161
+ ^ $ expr ->negatedInt ;
158
162
}
159
163
160
164
if (empty ($ l_value ) && empty ($ r_value )) {
@@ -192,6 +196,8 @@ public static function evaluate(
192
196
return (float ) $ l_value <= (float ) $ r_value ? 1 : 0 ^ $ expr ->negatedInt ;
193
197
}
194
198
199
+ // PHPCS thinks there's a fallthrough here, but there provably is not
200
+
195
201
case '* ' :
196
202
case '% ' :
197
203
case 'MOD ' :
0 commit comments