debug/Handler.php
protected function runConditions(\Exception $exception) : bool
    {
        $prevent = false;

        foreach ($this->conditions as $condition) {
            // We can call the methods on a Condition instance directly.
            if ($condition instanceof Condition) {
                if (true === $condition->matches($exception, $this)) {
                    $response = $condition->onMatch($exception, $this);
                } else {
                    continue;
                }
            }
            // Otherwise we're dealing with our little 'array' condition, ie. two callables. Run the match straight
            // away.
            elseif (true === call_user_func($condition['matcher'], $exception, $this)) {
                $response = call_user_func($condition['onMatch'], $exception, $this);
            } else {
                continue;
            }

            // Now let's check what onMatch() returned and see if it's a QUIT and we may exit.
            if (($response & definitions\Signals::QUIT) === definitions\Signals::QUIT && $this->allowQuit) {
                exit;
            }

            // Using the PREVENT signal on its own will not break the loop but we will need to pass it to the Handler
            // afterwards so it knows that it shouldn't proceed with its own code.
            if (($response & definitions\Signals::PREVENT) === definitions\Signals::PREVENT) {
                $prevent = true;
            }

            // QUIT includes STOP so this will catch both situations.
            if (($response & definitions\Signals::STOP) === definitions\Signals::STOP) {
                break;
            }
        }

        return $prevent;
    }
protected function runConditions(\Exception $exception) : bool
    {
        $prevent = false;

        foreach ($this->conditions as $condition) {
            // We can call the methods on a Condition instance directly.
            if ($condition instanceof Condition) {
                if (true === $condition->matches($exception, $this)) {
                    $response = $condition->onMatch($exception, $this);
                } else {
                    continue;
                }
            }
            // Otherwise we're dealing with our little 'array' condition, ie. two callables. Run the match straight
            // away.
            elseif (true === call_user_func($condition['matcher'], $exception, $this)) {
                $response = call_user_func($condition['onMatch'], $exception, $this);
            } else {
                continue;
            }

            // Now let's check what onMatch() returned and see if it's a QUIT and we may exit.
            if (($response & definitions\Signals::QUIT) === definitions\Signals::QUIT && $this->allowQuit) {
                exit;
            }

            // Using the PREVENT signal on its own will not break the loop but we will need to pass it to the Handler
            // afterwards so it knows that it shouldn't proceed with its own code.
            if (($response & definitions\Signals::PREVENT) === definitions\Signals::PREVENT) {
                $prevent = true;
            }

            // QUIT includes STOP so this will catch both situations.
            if (($response & definitions\Signals::STOP) === definitions\Signals::STOP) {
                break;
            }
        }

        return $prevent;
    }
protected function runConditions ( \ Exception $ exception ) : bool { $ prevent = false ; foreach ( $ this -> conditions as $ condition ) { // We can call the methods on a Condition instance directly. if ( $ condition instanceof Condition ) { if ( true === $ condition -> matches ( $ exception , $ this ) ) { $ response = $ condition -> onMatch ( $ exception , $ this ) ; } else { continue ; } } // Otherwise we're dealing with our little 'array' condition, ie. two callables. Run the match straight // away. elseif ( true === call_user_func ( $ condition [ 'matcher' ] , $ exception , $ this ) ) { $ response = call_user_func ( $ condition [ 'onMatch' ] , $ exception , $ this ) ; } else { continue ; } // Now let's check what onMatch() returned and see if it's a QUIT and we may exit. if ( ( $ response & definitions \ Signals :: QUIT ) === definitions \ Signals :: QUIT && $ this -> allowQuit ) { exit ; } // Using the PREVENT signal on its own will not break the loop but we will need to pass it to the Handler // afterwards so it knows that it shouldn't proceed with its own code. if ( ( $ response & definitions \ Signals :: PREVENT ) === definitions \ Signals :: PREVENT ) { $ prevent = true ; } // QUIT includes STOP so this will catch both situations. if ( ( $ response & definitions \ Signals :: STOP ) === definitions \ Signals :: STOP ) { break ; } } return $ prevent ; }
Runs through the registered Conditions and invokes their callbacks when they match the given Exception.

@param   \Exception  $exception  The Exception conditions should match
@return  bool                    True when any Condition returns the PREVENT signal, false otherwise.
Runs through the registered Conditions and invokes their callbacks when they match the given Exception .