public function cleanBacktrace(array $trace): array
    {
        // find first not removable index
        $firstNotRemovable = 0;
        foreach ($trace as $index => $item) {
            if (! $this->shouldRemoveStack($item)) {
                $firstNotRemovable = $index;
                break;
            }
        }

        $trace = array_slice($trace, $firstNotRemovable ?: 0);

        return $trace;
    }
public function cleanBacktrace(array $trace): array
    {
        // find first not removable index
        $firstNotRemovable = 0;
        foreach ($trace as $index => $item) {
            if (! $this->shouldRemoveStack($item)) {
                $firstNotRemovable = $index;
                break;
            }
        }

        $trace = array_slice($trace, $firstNotRemovable ?: 0);

        return $trace;
    }
public function cleanBacktrace ( array $ trace ) : array { // find first not removable index $ firstNotRemovable = 0 ; foreach ( $ trace as $ index => $ item ) { if ( ! $ this -> shouldRemoveStack ( $ item ) ) { $ firstNotRemovable = $ index ; break ; } } $ trace = array_slice ( $ trace , $ firstNotRemovable ? : 0 ) ; return $ trace ; }
Remove stacks until the stack is from outside the logging context based on namespaces to ignore.

@param array $trace
@return array
Remove stacks until the stack is from outside the logging context based on namespaces to ignore .