/**
  * @return array
  */
 public function getDefaults()
 {
     $origin = $this->gitConfig->getOrigin();
     if (null !== $origin) {
         list($vendor, $name) = explode('/', $origin);
         return [$this->inflector->titlecase($vendor) . '\\' . $this->inflector->titlecase($name), $this->inflector->initials($vendor) . '\\' . $this->inflector->titlecase($name)];
     } else {
         return [];
     }
 }
Example #2
0
 /**
  * @return string
  */
 public function getDefault()
 {
     $origin = $this->gitConfig->getOrigin();
     if (null !== $origin) {
         $response = $this->github->get("/repos/{$origin}");
         $repo = json_decode($response->getBody(), true);
         return $this->inflector->title($repo['name']);
     }
     return $this->inflector->title(getcwd());
 }