@@ -126,8 +126,10 @@ public static function evaluate(
126126 && \preg_match ('/^[0-9]{2,4}-[0-1][0-9]-[0-3][0-9]$/ ' , $ r_value )
127127 ) {
128128 $ 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 )
131133 ) {
132134 $ l_value .= ' 00:00:00 ' ;
133135 }
@@ -142,7 +144,8 @@ public static function evaluate(
142144 switch ($ expr ->operator ) {
143145 case '= ' :
144146 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 ;
146149 }
147150
148151 if (empty ($ l_value ) && empty ($ r_value )) {
@@ -154,7 +157,8 @@ public static function evaluate(
154157 case '<> ' :
155158 case '!= ' :
156159 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 ;
158162 }
159163
160164 if (empty ($ l_value ) && empty ($ r_value )) {
@@ -192,6 +196,8 @@ public static function evaluate(
192196 return (float ) $ l_value <= (float ) $ r_value ? 1 : 0 ^ $ expr ->negatedInt ;
193197 }
194198
199+ // PHPCS thinks there's a fallthrough here, but there provably is not
200+
195201 case '* ' :
196202 case '% ' :
197203 case 'MOD ' :
0 commit comments