Library/Optimizers/EvalExpression.php
public function optimizeNot($expr, CompilationContext $compilationContext)
    {
        /*
         * Compile the expression negating the evaluated expression
         */
        if ('not' == $expr['type']) {
            $conditions = $this->optimize($expr['left'], $compilationContext);
            if (false !== $conditions) {
                if (null !== $this->unreachable) {
                    $this->unreachable = !$this->unreachable;
                }
                if (null !== $this->unreachableElse) {
                    $this->unreachableElse = !$this->unreachableElse;
                }

                return '!('.$conditions.')';
            }
        }

        return false;
    }
public function optimizeNot($expr, CompilationContext $compilationContext)
    {
        /*
         * Compile the expression negating the evaluated expression
         */
        if ('not' == $expr['type']) {
            $conditions = $this->optimize($expr['left'], $compilationContext);
            if (false !== $conditions) {
                if (null !== $this->unreachable) {
                    $this->unreachable = !$this->unreachable;
                }
                if (null !== $this->unreachableElse) {
                    $this->unreachableElse = !$this->unreachableElse;
                }

                return '!('.$conditions.')';
            }
        }

        return false;
    }
public function optimizeNot ( $ expr , CompilationContext $ compilationContext ) { /*
         * Compile the expression negating the evaluated expression
         */ if ( 'not' == $ expr [ 'type' ] ) { $ conditions = $ this -> optimize ( $ expr [ 'left' ] , $ compilationContext ) ; if ( false !== $ conditions ) { if ( null !== $ this -> unreachable ) { $ this -> unreachable = ! $ this -> unreachable ; } if ( null !== $ this -> unreachableElse ) { $ this -> unreachableElse = ! $ this -> unreachableElse ; } return '!(' . $ conditions . ')' ; } } return false ; }
Skips the not operator by recursively optimizing the expression at its right.

@param array              $expr
@param CompilationContext $compilationContext

@return bool|string
Skips the not operator by recursively optimizing the expression at its right .