protected function getFiles($filename, array $files, array $directories)
    {
        // Get files from passed in options
        $search = $files;
        $paths  = $this->laravel['view']->getFinder()->getPaths();

        if (!empty($filename)) {
            $search[] = $filename;
        }

        if (!empty($directories)) {
            $search_directories = [];

            foreach ($directories as $directory) {
                foreach ($paths as $path) {
                    if (is_dir($path.'/'.$directory)) {
                        $search_directories[] = $path.'/'.$directory;
                    }
                }
            }

            if (!empty($search_directories)) {
                // Get those files from the search directory
                foreach ($this->getFinder($search_directories) as $file) {
                    $search[] = $file->getRealPath();
                }
            }
        }

        // If no files passed, use the view paths
        if (empty($search)) {
            foreach ($this->getFinder($paths) as $file) {
                $search[] = $file->getRealPath();
            }
        }

        return $search;
    }
protected function getFiles($filename, array $files, array $directories)
    {
        // Get files from passed in options
        $search = $files;
        $paths  = $this->laravel['view']->getFinder()->getPaths();

        if (!empty($filename)) {
            $search[] = $filename;
        }

        if (!empty($directories)) {
            $search_directories = [];

            foreach ($directories as $directory) {
                foreach ($paths as $path) {
                    if (is_dir($path.'/'.$directory)) {
                        $search_directories[] = $path.'/'.$directory;
                    }
                }
            }

            if (!empty($search_directories)) {
                // Get those files from the search directory
                foreach ($this->getFinder($search_directories) as $file) {
                    $search[] = $file->getRealPath();
                }
            }
        }

        // If no files passed, use the view paths
        if (empty($search)) {
            foreach ($this->getFinder($paths) as $file) {
                $search[] = $file->getRealPath();
            }
        }

        return $search;
    }
protected function getFiles ( $ filename , array $ files , array $ directories ) { // Get files from passed in options $ search = $ files ; $ paths = $ this -> laravel [ 'view' ] -> getFinder ( ) -> getPaths ( ) ; if ( ! empty ( $ filename ) ) { $ search [ ] = $ filename ; } if ( ! empty ( $ directories ) ) { $ search_directories = [ ] ; foreach ( $ directories as $ directory ) { foreach ( $ paths as $ path ) { if ( is_dir ( $ path . '/' . $ directory ) ) { $ search_directories [ ] = $ path . '/' . $ directory ; } } } if ( ! empty ( $ search_directories ) ) { // Get those files from the search directory foreach ( $ this -> getFinder ( $ search_directories ) as $ file ) { $ search [ ] = $ file -> getRealPath ( ) ; } } } // If no files passed, use the view paths if ( empty ( $ search ) ) { foreach ( $ this -> getFinder ( $ paths ) as $ file ) { $ search [ ] = $ file -> getRealPath ( ) ; } } return $ search ; }
Gets an array of files to lint.

@param string $filename    Single file to check.
@param array  $files       Array of files to check.
@param array  $directories Array of directories to get the files from.

@return array
Gets an array of files to lint .