예제 #1
0
 /**
  * Clone a Github repository.
  *
  * @param string $name
  * @return boolean
  */
 public function cloneGithubRepository($name)
 {
     $command = "git clone https://github.com/{$name}.git";
     $output = $this->runner->run($command)["stderr"];
     return strpos($output, "remote: Repository not found.") === false;
 }
예제 #2
0
 /**
  * Check if there is a composer.json file in given directory and it is valid.
  * We will use the "validate" command provided by the Composer CLI to find it out.
  *
  * @param string $directory
  * @return boolean
  */
 public function isManifestValid($directory)
 {
     $output = $this->runner->run($this->getComposerExecutablePath($directory) . " validate");
     return $output["stdout"] == "./composer.json is valid" . PHP_EOL;
 }