public function scan() : ParseQueue
    {
        // completely populate the splFileInfos property
        $this->fileInfos = [];
        foreach ($this->finder as $fileInfo) {
            $relativeFilename = $fileInfo->getRelativePathname();
            // strip off the extension
            $documentPath = substr($relativeFilename, 0, -(strlen($this->fileExtension) + 1));

            $this->fileInfos[$documentPath] = $fileInfo;
        }

        $parseQueue = new ParseQueue();
        foreach ($this->fileInfos as $filename => $fileInfo) {
            $parseQueue->addFile(
                $filename,
                $this->doesFileRequireParsing($filename, $parseQueue)
            );
        }

        return $parseQueue;
    }
public function scan() : ParseQueue
    {
        // completely populate the splFileInfos property
        $this->fileInfos = [];
        foreach ($this->finder as $fileInfo) {
            $relativeFilename = $fileInfo->getRelativePathname();
            // strip off the extension
            $documentPath = substr($relativeFilename, 0, -(strlen($this->fileExtension) + 1));

            $this->fileInfos[$documentPath] = $fileInfo;
        }

        $parseQueue = new ParseQueue();
        foreach ($this->fileInfos as $filename => $fileInfo) {
            $parseQueue->addFile(
                $filename,
                $this->doesFileRequireParsing($filename, $parseQueue)
            );
        }

        return $parseQueue;
    }
public function scan ( ) : ParseQueue { // completely populate the splFileInfos property $ this -> fileInfos = [ ] ; foreach ( $ this -> finder as $ fileInfo ) { $ relativeFilename = $ fileInfo -> getRelativePathname ( ) ; // strip off the extension $ documentPath = substr ( $ relativeFilename , 0 , - ( strlen ( $ this -> fileExtension ) + 1 ) ) ; $ this -> fileInfos [ $ documentPath ] = $ fileInfo ; } $ parseQueue = new ParseQueue ( ) ; foreach ( $ this -> fileInfos as $ filename => $ fileInfo ) { $ parseQueue -> addFile ( $ filename , $ this -> doesFileRequireParsing ( $ filename , $ parseQueue ) ) ; } return $ parseQueue ; }
Scans a directory recursively looking for all files to parse.

This takes into account the presence of cached & fresh MetaEntry
objects, and avoids adding files to the parse queue that have
not changed and whose direct dependencies have not changed.
Scans a directory recursively looking for all files to parse .