withGitInit() public method

Whether or not to initialize a git repo on the project.
public withGitInit ( ) : boolean
return boolean
 /**
  * Show message if an empty git repo is initialized.
  *
  * @param \Symfony\Component\Console\Output\OutputInterface $output
  *
  * @return void
  */
 private function initializedGitMessage($output)
 {
     if ($this->settings->withGitInit()) {
         $folder = $this->construct->getprojectLower();
         $output->writeln('<info>Initialized git repo in "' . $folder . '".</info>');
     }
 }
Beispiel #2
0
 /**
  * Generate project.
  *
  * @param \JonathanTorres\Construct\Settings         $settings The command settings made by the user.
  * @param \JonathanTorres\Construct\Helpers\Git      $git      The git helper.
  * @param \JonathanTorres\Construct\Helpers\Composer $composer The composer helper.
  *
  * @return void
  */
 public function generate(Settings $settings, Git $git, Composer $composer)
 {
     $this->settings = $settings;
     $this->saveNames();
     $this->root();
     $this->src();
     $this->docs();
     $this->gitignore();
     $this->testing();
     if ($this->settings->withPhpcsConfiguration()) {
         $this->phpcs();
     }
     if ($this->settings->withVagrantFile()) {
         $this->vagrant();
     }
     if ($this->settings->withEditorConfig()) {
         $this->editorConfig();
     }
     $this->travis();
     $this->license($git);
     $this->composer($git);
     $this->projectClass();
     $this->projectTest();
     $this->gitattributes();
     if ($this->settings->withGitInit()) {
         $this->gitInit($git);
     }
     $this->composerInstall($composer);
 }
Beispiel #3
0
 /**
  * Generate project.
  *
  * @param \JonathanTorres\Construct\Settings       $settings The command settings made by the user.
  * @param \JonathanTorres\Construct\Helpers\Git    $git      The git helper.
  * @param \JonathanTorres\Construct\Helpers\Script $script   The script helper.
  *
  * @return void
  */
 public function generate(Settings $settings, Git $git, Script $script)
 {
     $this->settings = $settings;
     $this->saveNames();
     $this->root();
     $this->src();
     $this->docs();
     $this->testing();
     if ($this->settings->withPhpcsConfiguration()) {
         $this->phpcs();
     }
     if ($this->settings->withVagrantFile()) {
         $this->vagrant();
     }
     if ($this->settings->withEditorConfig()) {
         $this->editorConfig();
     }
     if ($this->settings->withEnvironmentFiles()) {
         $this->environmentFiles();
     }
     if ($this->settings->withLgtmConfiguration()) {
         $this->lgtmFiles();
     }
     if ($this->settings->withGithubTemplates()) {
         $this->githubTemplates();
     }
     if ($this->settings->withGithubDocs()) {
         $this->githubDocs();
     }
     if ($this->settings->withCodeOfConduct()) {
         $this->codeOfConduct();
     }
     $this->travis();
     $this->license($git);
     $this->composer($git);
     $this->projectClass();
     $this->gitignore();
     $this->gitmessage();
     $this->gitattributes();
     if ($this->settings->withGitInit()) {
         $this->gitInit($git);
     }
     $this->composerInstall($script);
     $this->scripts($script);
 }