/** * 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; }
/** * @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); } }
/** * @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); } }
/** * @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); }
/** * @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; }