public static function create(
        $masterLanguage,
        array $availableLanguages,
        array $paths
    ) : Project {
        $finder = new Finder();
        $finder
            ->files()
            ->in($paths)
            ->name('*.yml')
            ->name('*.yaml');

        $repositories = [];
        foreach ($finder as $file) {
            $filepath = $file->getRealpath();
            $repositories[] = Repository::createByFilePath($filepath);
        }
        $repositoryCollection = RepositoryCollection::create($repositories);

        return new self(
            $repositoryCollection,
            $masterLanguage,
            $availableLanguages,
            $paths
        );
    }
public static function create(
        $masterLanguage,
        array $availableLanguages,
        array $paths
    ) : Project {
        $finder = new Finder();
        $finder
            ->files()
            ->in($paths)
            ->name('*.yml')
            ->name('*.yaml');

        $repositories = [];
        foreach ($finder as $file) {
            $filepath = $file->getRealpath();
            $repositories[] = Repository::createByFilePath($filepath);
        }
        $repositoryCollection = RepositoryCollection::create($repositories);

        return new self(
            $repositoryCollection,
            $masterLanguage,
            $availableLanguages,
            $paths
        );
    }
public static function create ( $ masterLanguage , array $ availableLanguages , array $ paths ) : Project { $ finder = new Finder ( ) ; $ finder -> files ( ) -> in ( $ paths ) -> name ( '*.yml' ) -> name ( '*.yaml' ) ; $ repositories = [ ] ; foreach ( $ finder as $ file ) { $ filepath = $ file -> getRealpath ( ) ; $ repositories [ ] = Repository :: createByFilePath ( $ filepath ) ; } $ repositoryCollection = RepositoryCollection :: create ( $ repositories ) ; return new self ( $ repositoryCollection , $ masterLanguage , $ availableLanguages , $ paths ) ; }
Create a project from a list of paths.

@param string   $masterLanguage
@param string[] $availableLanguages
@param string[] $paths

@return Project
Create a project from a list of paths .