private function getSimpleCallTrace(array $backtrace): array
    {
        $calls = [];
        $exitOnNext = false;
        foreach ($backtrace as $call) {
            if (!isset($call['class'][2]) || ($call['class'][2] !== '\\' && \strpos($call['class'], '\\') === false)) {
                // skip if class has no namespace (Symfony lazy proxy or plain function)
                continue;
            }

            $calls[] = $call['class'] . $call['type'] . $call['function'] . '()';

            if ($exitOnNext) {
                break;
            }

            // Break out as soon as we have listed 2 classes outside of kernel
            if ($call['class'][0] !== 'e' && \strpos($call['class'], 'eZ\\Publish\\Core\\') !== 0) {
                $exitOnNext = true;
            }
        }

        return $calls;
    }
private function getSimpleCallTrace(array $backtrace): array
    {
        $calls = [];
        $exitOnNext = false;
        foreach ($backtrace as $call) {
            if (!isset($call['class'][2]) || ($call['class'][2] !== '\\' && \strpos($call['class'], '\\') === false)) {
                // skip if class has no namespace (Symfony lazy proxy or plain function)
                continue;
            }

            $calls[] = $call['class'] . $call['type'] . $call['function'] . '()';

            if ($exitOnNext) {
                break;
            }

            // Break out as soon as we have listed 2 classes outside of kernel
            if ($call['class'][0] !== 'e' && \strpos($call['class'], 'eZ\\Publish\\Core\\') !== 0) {
                $exitOnNext = true;
            }
        }

        return $calls;
    }
private function getSimpleCallTrace ( array $ backtrace ) : array { $ calls = [ ] ; $ exitOnNext = false ; foreach ( $ backtrace as $ call ) { if ( ! isset ( $ call [ 'class' ] [ 2 ] ) || ( $ call [ 'class' ] [ 2 ] !== '\\' && \ strpos ( $ call [ 'class' ] , '\\' ) === false ) ) { // skip if class has no namespace (Symfony lazy proxy or plain function) continue ; } $ calls [ ] = $ call [ 'class' ] . $ call [ 'type' ] . $ call [ 'function' ] . '()' ; if ( $ exitOnNext ) { break ; } // Break out as soon as we have listed 2 classes outside of kernel if ( $ call [ 'class' ] [ 0 ] !== 'e' && \ strpos ( $ call [ 'class' ] , 'eZ\\Publish\\Core\\' ) !== 0 ) { $ exitOnNext = true ; } } return $ calls ; }
Simplify trace to an array of strings.

Skipps any traces from Syfony proxies or closures to make trace as readable as possible in as few lines as
possible. And point is to identify which code outside kernel is triggering the SPI call, so trace stops one
call after namespace is no longer in eZ\Publish\Core\.

@param array $backtrace Partial backtrace from |debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS) or similar.

@return string[]
Simplify trace to an array of strings .