components/BaseController.php
protected function searchFiles($sourceDirs)
    {
        $this->stdout('Searching files to process... ');
        $files = [];

        if (is_array($this->exclude)) {
            $exclude = $this->exclude;
        } elseif (is_string($this->exclude)) {
            $exclude = explode(',', $this->exclude);
        } else {
            $exclude = [];
        }

        foreach ($sourceDirs as $source) {
            foreach ($this->findFiles($source, $exclude) as $fileName) {
                $files[$fileName] = $fileName;
            }
        }
        $this->stdout('done.' . PHP_EOL, Console::FG_GREEN);

        if (empty($files)) {
            $this->stderr('Error: No files found to process.' . PHP_EOL);

            return false;
        }

        return $files;
    }
protected function searchFiles($sourceDirs)
    {
        $this->stdout('Searching files to process... ');
        $files = [];

        if (is_array($this->exclude)) {
            $exclude = $this->exclude;
        } elseif (is_string($this->exclude)) {
            $exclude = explode(',', $this->exclude);
        } else {
            $exclude = [];
        }

        foreach ($sourceDirs as $source) {
            foreach ($this->findFiles($source, $exclude) as $fileName) {
                $files[$fileName] = $fileName;
            }
        }
        $this->stdout('done.' . PHP_EOL, Console::FG_GREEN);

        if (empty($files)) {
            $this->stderr('Error: No files found to process.' . PHP_EOL);

            return false;
        }

        return $files;
    }
protected function searchFiles ( $ sourceDirs ) { $ this -> stdout ( 'Searching files to process... ' ) ; $ files = [ ] ; if ( is_array ( $ this -> exclude ) ) { $ exclude = $ this -> exclude ; } elseif ( is_string ( $ this -> exclude ) ) { $ exclude = explode ( ',' , $ this -> exclude ) ; } else { $ exclude = [ ] ; } foreach ( $ sourceDirs as $ source ) { foreach ( $ this -> findFiles ( $ source , $ exclude ) as $ fileName ) { $ files [ $ fileName ] = $ fileName ; } } $ this -> stdout ( 'done.' . PHP_EOL , Console :: FG_GREEN ) ; if ( empty ( $ files ) ) { $ this -> stderr ( 'Error: No files found to process.' . PHP_EOL ) ; return false ; } return $ files ; }
Finds files to process
@param array $sourceDirs
@return array|bool list of files to process or false on failure
Finds files to process