src/Linter.php
protected function getFilesFromDir($dir)
    {
        $finder = new Finder();
        $finder->files()->ignoreUnreadableDirs()->in(realpath($dir));

        foreach ($this->excludes as $exclude) {
            $finder->notPath($exclude);
        }

        foreach ($this->extensions as $extension) {
            $finder->name('*.'.$extension);
        }

        return iterator_to_array($finder);
    }
protected function getFilesFromDir($dir)
    {
        $finder = new Finder();
        $finder->files()->ignoreUnreadableDirs()->in(realpath($dir));

        foreach ($this->excludes as $exclude) {
            $finder->notPath($exclude);
        }

        foreach ($this->extensions as $extension) {
            $finder->name('*.'.$extension);
        }

        return iterator_to_array($finder);
    }
protected function getFilesFromDir ( $ dir ) { $ finder = new Finder ( ) ; $ finder -> files ( ) -> ignoreUnreadableDirs ( ) -> in ( realpath ( $ dir ) ) ; foreach ( $ this -> excludes as $ exclude ) { $ finder -> notPath ( $ exclude ) ; } foreach ( $ this -> extensions as $ extension ) { $ finder -> name ( '*.' . $ extension ) ; } return iterator_to_array ( $ finder ) ; }
Get files from directory.

@param string $dir

@return SplFileInfo[]
Get files from directory .