public function formatSource($source)
    {
        if (! is_object($source)) {
            return '';
        }

        $parts = [];

        if ($source->namespace) {
            $parts['namespace'] = $source->namespace . '::';
        }

        $parts['name'] = $source->name;
        $parts['line'] = ':' . $source->line;

        return implode($parts);
    }
public function formatSource($source)
    {
        if (! is_object($source)) {
            return '';
        }

        $parts = [];

        if ($source->namespace) {
            $parts['namespace'] = $source->namespace . '::';
        }

        $parts['name'] = $source->name;
        $parts['line'] = ':' . $source->line;

        return implode($parts);
    }
public function formatSource ( $ source ) { if ( ! is_object ( $ source ) ) { return '' ; } $ parts = [ ] ; if ( $ source -> namespace ) { $ parts [ 'namespace' ] = $ source -> namespace . '::' ; } $ parts [ 'name' ] = $ source -> name ; $ parts [ 'line' ] = ':' . $ source -> line ; return implode ( $ parts ) ; }
Format a source object.

@param  object|null  $source  If the backtrace is disabled, the $source will be null.
@return string
Format a source object .