private function cloneByRepositoryUrl($args)
    {
        $repositoryUrl = $args[0];
        $projectName = isset($args[1]) ? $args[1] : $this->getProjectNameByRepositoryUrl($repositoryUrl);

        if (!$this->existsRepositoryUrl($repositoryUrl)) {
            return 'Repository url not exists!';
        }

        if ($this->existsProjectName($projectName)) {
            return "> Producer: Project '{$this->projectsDir}/{$projectName}' already exists during clone.\n";
        }

        $this->info("Clone by repository url '{$repositoryUrl}'");
        $this->exec('clone', 'clone-by-repository-url', [$repositoryUrl, $projectName]);

        if ($this->noMount) {
            return;
        }

        $packageName = $this->getProjectPackageName($projectName, $repositoryUrl);

        if (!$this->existsPackageName($packageName)) {
            return $this->exec('clone', 'mount-unknown-package-as-project', [$packageName, $projectName]);
        }

        if (!$this->existsRootComposerJson()) {
            $this->createRootComposerJson();
        }

        return $this->exec('clone', 'mount-require-package-as-project', [$packageName, $projectName]);
    }
private function cloneByRepositoryUrl($args)
    {
        $repositoryUrl = $args[0];
        $projectName = isset($args[1]) ? $args[1] : $this->getProjectNameByRepositoryUrl($repositoryUrl);

        if (!$this->existsRepositoryUrl($repositoryUrl)) {
            return 'Repository url not exists!';
        }

        if ($this->existsProjectName($projectName)) {
            return "> Producer: Project '{$this->projectsDir}/{$projectName}' already exists during clone.\n";
        }

        $this->info("Clone by repository url '{$repositoryUrl}'");
        $this->exec('clone', 'clone-by-repository-url', [$repositoryUrl, $projectName]);

        if ($this->noMount) {
            return;
        }

        $packageName = $this->getProjectPackageName($projectName, $repositoryUrl);

        if (!$this->existsPackageName($packageName)) {
            return $this->exec('clone', 'mount-unknown-package-as-project', [$packageName, $projectName]);
        }

        if (!$this->existsRootComposerJson()) {
            $this->createRootComposerJson();
        }

        return $this->exec('clone', 'mount-require-package-as-project', [$packageName, $projectName]);
    }
private function cloneByRepositoryUrl ( $ args ) { $ repositoryUrl = $ args [ 0 ] ; $ projectName = isset ( $ args [ 1 ] ) ? $ args [ 1 ] : $ this -> getProjectNameByRepositoryUrl ( $ repositoryUrl ) ; if ( ! $ this -> existsRepositoryUrl ( $ repositoryUrl ) ) { return 'Repository url not exists!' ; } if ( $ this -> existsProjectName ( $ projectName ) ) { return "> Producer: Project '{$this->projectsDir}/{$projectName}' already exists during clone.\n" ; } $ this -> info ( "Clone by repository url '{$repositoryUrl}'" ) ; $ this -> exec ( 'clone' , 'clone-by-repository-url' , [ $ repositoryUrl , $ projectName ] ) ; if ( $ this -> noMount ) { return ; } $ packageName = $ this -> getProjectPackageName ( $ projectName , $ repositoryUrl ) ; if ( ! $ this -> existsPackageName ( $ packageName ) ) { return $ this -> exec ( 'clone' , 'mount-unknown-package-as-project' , [ $ packageName , $ projectName ] ) ; } if ( ! $ this -> existsRootComposerJson ( ) ) { $ this -> createRootComposerJson ( ) ; } return $ this -> exec ( 'clone' , 'mount-require-package-as-project' , [ $ packageName , $ projectName ] ) ; }
Clone repository by url.

@param mixed $args
Clone repository by url .