classes/phing/tasks/ext/PhpCodeSnifferTask.php
protected function getFilesToParse()
    {
        $filesToParse = [];

        if ($this->file instanceof PhingFile) {
            $filesToParse[] = $this->file->getPath();
        } else {
            // append any files in filesets
            foreach ($this->filesets as $fs) {
                $dir = $fs->getDir($this->project)->getAbsolutePath();
                foreach ($fs->getDirectoryScanner($this->project)->getIncludedFiles() as $filename) {
                    $fileAbsolutePath = $dir . DIRECTORY_SEPARATOR . $filename;
                    if ($this->cache) {
                        $lastMTime = $this->cache->get($fileAbsolutePath);
                        $currentMTime = filemtime($fileAbsolutePath);
                        if ($lastMTime >= $currentMTime) {
                            continue;
                        } else {
                            $this->cache->put($fileAbsolutePath, $currentMTime);
                        }
                    }
                    $filesToParse[] = $fileAbsolutePath;
                }
            }
        }
        return $filesToParse;
    }
protected function getFilesToParse()
    {
        $filesToParse = [];

        if ($this->file instanceof PhingFile) {
            $filesToParse[] = $this->file->getPath();
        } else {
            // append any files in filesets
            foreach ($this->filesets as $fs) {
                $dir = $fs->getDir($this->project)->getAbsolutePath();
                foreach ($fs->getDirectoryScanner($this->project)->getIncludedFiles() as $filename) {
                    $fileAbsolutePath = $dir . DIRECTORY_SEPARATOR . $filename;
                    if ($this->cache) {
                        $lastMTime = $this->cache->get($fileAbsolutePath);
                        $currentMTime = filemtime($fileAbsolutePath);
                        if ($lastMTime >= $currentMTime) {
                            continue;
                        } else {
                            $this->cache->put($fileAbsolutePath, $currentMTime);
                        }
                    }
                    $filesToParse[] = $fileAbsolutePath;
                }
            }
        }
        return $filesToParse;
    }
protected function getFilesToParse ( ) { $ filesToParse = [ ] ; if ( $ this -> file instanceof PhingFile ) { $ filesToParse [ ] = $ this -> file -> getPath ( ) ; } else { // append any files in filesets foreach ( $ this -> filesets as $ fs ) { $ dir = $ fs -> getDir ( $ this -> project ) -> getAbsolutePath ( ) ; foreach ( $ fs -> getDirectoryScanner ( $ this -> project ) -> getIncludedFiles ( ) as $ filename ) { $ fileAbsolutePath = $ dir . DIRECTORY_SEPARATOR . $ filename ; if ( $ this -> cache ) { $ lastMTime = $ this -> cache -> get ( $ fileAbsolutePath ) ; $ currentMTime = filemtime ( $ fileAbsolutePath ) ; if ( $ lastMTime >= $ currentMTime ) { continue ; } else { $ this -> cache -> put ( $ fileAbsolutePath , $ currentMTime ) ; } } $ filesToParse [ ] = $ fileAbsolutePath ; } } } return $ filesToParse ; }
Return the list of files to parse

@return string[] list of absolute files to parse
Return the list of files to parse