private function unpackThrowables($throwable)
    {
        if (!$throwable instanceof Throwable) {
            return [];
        }

        $throwables = [$throwable];
        while ($throwable = $throwable->getPrevious()) {
            $throwables[] = $throwable;
        }

        return $throwables;
    }
private function unpackThrowables($throwable)
    {
        if (!$throwable instanceof Throwable) {
            return [];
        }

        $throwables = [$throwable];
        while ($throwable = $throwable->getPrevious()) {
            $throwables[] = $throwable;
        }

        return $throwables;
    }
private function unpackThrowables ( $ throwable ) { if ( ! $ throwable instanceof Throwable ) { return [ ] ; } $ throwables = [ $ throwable ] ; while ( $ throwable = $ throwable -> getPrevious ( ) ) { $ throwables [ ] = $ throwable ; } return $ throwables ; }
Unpack nested throwables into a flat array

@param Throwable$throwable

@return Throwable[]
Unpack nested throwables into a flat array