Example #1
0
 /**
  * Print to console final message.
  *
  * @return int
  */
 private function finalMessage()
 {
     if ($this->errors > 0) {
         $this->io->block($this->error(), 'red', true);
         return self::ERROR;
     }
     $this->io->block($this->success(), 'green', false);
     return self::SUCCESS;
 }
Example #2
0
 /**
  * @inheritdoc
  */
 public function postProcess(IO $io)
 {
     if (!$this->themeDir) {
         $lines = array('Default theme folder:', '"' . $this->paths['wp-content'] . '/themes" does not exist.', 'The site may be unusable until you create it (even empty).');
         $io->block($lines, 'red', true);
     }
 }
Example #3
0
 /**
  * @inheritdoc
  */
 public function postProcess(IO $io)
 {
     if (!is_file($this->paths['root'] . DIRECTORY_SEPARATOR . '.env')) {
         $lines = array('Remember you need a .env file with DB settings', 'to make your site fully functional.');
         $io->block($lines, 'yellow', false);
     }
 }
Example #4
0
 /**
  * @inheritdoc
  */
 public function postProcess(IO $io)
 {
     $lines = false;
     if ($this->found === true) {
         $lines = array('.gitignore was found in your project folder.', 'Be sure to ignore .env and wp-config.php files.');
     } elseif ($this->found === -1 && empty($this->error)) {
         $lines = array('.gitignore was saved in your project folder,', 'feel free to edit it, but be sure to ignore', '.env and wp-config.php files.');
     }
     $lines and $io->block($lines, 'yellow', false);
 }
Example #5
0
 /**
  * @param  \WCM\WPStarter\Setup\StepperInterface $stepper
  * @param  \WCM\WPStarter\Setup\Config           $config
  * @param  \ArrayObject                          $paths
  * @param  \WCM\WPStarter\Setup\IO               $io
  * @return bool
  */
 private function stepperAllowed(StepperInterface $stepper, Config $config, ArrayObject $paths, IO $io)
 {
     if (!$stepper->allowed($config, $paths)) {
         $lines = array('WP Starter installation CANCELED.', 'wp-config.php was found in root folder and your overwrite settings', 'do not allow to proceed.');
         $io->block($lines, 'yellow');
         return false;
     }
     return true;
 }