debug/handlers/Exception.php
public function remove($delegate, bool $all = true) : self
    {
        // When a string was passed, we will need to distinguish what to compare within our search.
        $name = is_string($delegate) ? $delegate : null;

        foreach ($this->delegates as $k => $v) {
            if (($name and $k === $name) or (!$name and $v['delegate'] === $delegate)) {
                unset($this->delegates[$k]);
                $this->applicable = null;

                if ($name or false === $all) {
                    break;
                }
            }
        }

        return $this;
    }
public function remove($delegate, bool $all = true) : self
    {
        // When a string was passed, we will need to distinguish what to compare within our search.
        $name = is_string($delegate) ? $delegate : null;

        foreach ($this->delegates as $k => $v) {
            if (($name and $k === $name) or (!$name and $v['delegate'] === $delegate)) {
                unset($this->delegates[$k]);
                $this->applicable = null;

                if ($name or false === $all) {
                    break;
                }
            }
        }

        return $this;
    }
public function remove ( $ delegate , bool $ all = true ) : self { // When a string was passed, we will need to distinguish what to compare within our search. $ name = is_string ( $ delegate ) ? $ delegate : null ; foreach ( $ this -> delegates as $ k => $ v ) { if ( ( $ name and $ k === $ name ) or ( ! $ name and $ v [ 'delegate' ] === $ delegate ) ) { unset ( $ this -> delegates [ $ k ] ) ; $ this -> applicable = null ; if ( $ name or false === $ all ) { break ; } } } return $ this ; }
Removes a specific Delegate or callable from the stack.

Important note: This will remove all *instances* of the given Delegate if it passes the strict match unless
$all is set to false *or* a name is used instead of an instance as the first argument to this method, since
Delegate names are unique within this Handler.

@param   string|interfaces\Delegate|callable     $delegate   Either the name of the Delegate/callable or
an actual instance to search for.
@param   bool                                    $all        Whether to search for all matches (true) or stop
after the first match (false).
@return  $this
Removes a specific Delegate or callable from the stack .