src/PHPFormatter/Command/PHPFormatterCommand.php
protected function loadFiles(
        string $path,
        array $excludes
    ) {
        $fileFinder = new FileFinder();

        /**
         * Building the real directory or file to work in.
         */
        $filesystem = new Filesystem();
        if (!$filesystem->isAbsolutePath($path)) {
            $path = getcwd() . DIRECTORY_SEPARATOR . ltrim($path, '/');
        }

        if (!is_file($path) && !is_dir($path)) {
            throw new Exception('Directory or file "' . $path . '" does not exist');
        }

        return $fileFinder
            ->findPHPFilesByPath(
                $path,
                $excludes
            );
    }
protected function loadFiles(
        string $path,
        array $excludes
    ) {
        $fileFinder = new FileFinder();

        /**
         * Building the real directory or file to work in.
         */
        $filesystem = new Filesystem();
        if (!$filesystem->isAbsolutePath($path)) {
            $path = getcwd() . DIRECTORY_SEPARATOR . ltrim($path, '/');
        }

        if (!is_file($path) && !is_dir($path)) {
            throw new Exception('Directory or file "' . $path . '" does not exist');
        }

        return $fileFinder
            ->findPHPFilesByPath(
                $path,
                $excludes
            );
    }
protected function loadFiles ( string $ path , array $ excludes ) { $ fileFinder = new FileFinder ( ) ; /**
         * Building the real directory or file to work in.
         */ $ filesystem = new Filesystem ( ) ; if ( ! $ filesystem -> isAbsolutePath ( $ path ) ) { $ path = getcwd ( ) . DIRECTORY_SEPARATOR . ltrim ( $ path , '/' ) ; } if ( ! is_file ( $ path ) && ! is_dir ( $ path ) ) { throw new Exception ( 'Directory or file "' . $ path . '" does not exist' ) ; } return $ fileFinder -> findPHPFilesByPath ( $ path , $ excludes ) ; }
Load files to work with.

@param string $path
@param array  $excludes

@return Finder|SplFileInfo[]

@throws Exception
Load files to work with .