Merged in feature/MAW-855-import-code-into-aws (pull request #2)
code import from pantheon * code import from pantheon
This commit is contained in:
@@ -42,6 +42,16 @@ class ComparisonOperation {
|
||||
return ! in_array( $right_operand, $left_operand, true );
|
||||
}
|
||||
return strpos( $right_operand, $left_operand ) === false;
|
||||
case 'in':
|
||||
if ( is_array( $right_operand ) && is_string( $left_operand ) ) {
|
||||
return in_array( $left_operand, $right_operand, true );
|
||||
}
|
||||
return strpos( $left_operand, $right_operand ) !== false;
|
||||
case '!in':
|
||||
if ( is_array( $right_operand ) && is_string( $left_operand ) ) {
|
||||
return ! in_array( $left_operand, $right_operand, true );
|
||||
}
|
||||
return strpos( $left_operand, $right_operand ) === false;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user