src/Query/WhereClause.php
/**
     * See if a value passes the test
     * @param mixed $value
     * @return bool
     */
See if a value passes the test
@param mixed $value
@return bool
See if a value passes the test @param mixed $value @return bool
public function valuePasses($value): bool
    {
        switch ($this->operator) {
            case '=':
            case '==':
                return ($value == $this->value);
            case '===':
                return ($value === $this->value);
            case '!=':
            case '<>':
                return ($value != $this->value);
            case '!==':
                return ($value !== $this->value);
            case '>':
                return ($value > $this->value);
            case '>=':
                return ($value >= $this->value);
            case '<':
                return ($value < $this->value);
            case '<=':
                return ($value <= $this->value);
            case 'like':
                $regex = preg_quote($this->value);
                $regex = str_replace('%', '.*', $regex);
                return (preg_match('/' . $regex . '/', $value) === 1);
        }
    }
public function valuePasses ( $ value ) : bool { switch ( $ this -> operator ) { case '=' : case '==' : return ( $ value == $ this -> value ) ; case '===' : return ( $ value === $ this -> value ) ; case '!=' : case '<>' : return ( $ value != $ this -> value ) ; case '!==' : return ( $ value !== $ this -> value ) ; case '>' : return ( $ value > $ this -> value ) ; case '>=' : return ( $ value >= $ this -> value ) ; case '<' : return ( $ value < $ this -> value ) ; case '<=' : return ( $ value <= $ this -> value ) ; case 'like' : $ regex = preg_quote ( $ this -> value ) ; $ regex = str_replace ( '%' , '.*' , $ regex ) ; return ( preg_match ( '/' . $ regex . '/' , $ value ) === 1 ) ; } }
See if a value passes the test
 @param mixed $value
 @return bool
See if a value passes the test @param mixed $value @return bool
// Translate percentage signs to regex syntax