Barryvdh\Debugbar\DataCollector\FilesCollector::collect PHP Method

collect() public method

{@inheritDoc}
public collect ( )
    public function collect()
    {
        $files = $this->getIncludedFiles();
        $compiled = $this->getCompiledFiles();
        $included = [];
        $alreadyCompiled = [];
        foreach ($files as $file) {
            // Skip the files from Debugbar, they are only loaded for Debugging and confuse the output.
            // Of course some files are stil always loaded (ServiceProvider, Facade etc)
            if (strpos($file, 'vendor/maximebf/debugbar/src') !== false || strpos($file, 'vendor/barryvdh/laravel-debugbar/src') !== false) {
                continue;
            } elseif (!in_array($file, $compiled)) {
                $included[] = ['message' => "'" . $this->stripBasePath($file) . "',", 'is_string' => true];
            } else {
                $alreadyCompiled[] = ['message' => "* '" . $this->stripBasePath($file) . "',", 'is_string' => true];
            }
        }
        // First the included files, then those that are going to be compiled.
        $messages = array_merge($included, $alreadyCompiled);
        return ['messages' => $messages, 'count' => count($included)];
    }