diff options
author | Marvin Borner | 2018-05-23 22:23:28 +0200 |
---|---|---|
committer | Marvin Borner | 2018-05-23 22:23:28 +0200 |
commit | b66a61addb6c8e66cb26fcf74b532d68891267e4 (patch) | |
tree | 05e9449ff25bdc98f68105f41923ccb9f6ef5095 /main/app/system/Bakery/Command/Debug.php | |
parent | 1d4ef435177a5f9b6d1a289800d933e49be0c550 (diff) |
Refactored code, many fixes and improvements in chat backend+frontend
Diffstat (limited to 'main/app/system/Bakery/Command/Debug.php')
-rw-r--r-- | main/app/system/Bakery/Command/Debug.php | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/main/app/system/Bakery/Command/Debug.php b/main/app/system/Bakery/Command/Debug.php index 4e8a3e4..60565a4 100644 --- a/main/app/system/Bakery/Command/Debug.php +++ b/main/app/system/Bakery/Command/Debug.php @@ -5,6 +5,7 @@ * @link https://github.com/userfrosting/UserFrosting * @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License) */ + namespace UserFrosting\System\Bakery\Command; use Symfony\Component\Console\Input\InputInterface; @@ -26,18 +27,16 @@ class Debug extends BaseCommand /** * {@inheritDoc} */ - protected function configure() - { + protected function configure() { $this->setName("debug") - ->setDescription("Test the UserFrosting installation and setup the database") - ->setHelp("This command is used to check if the various dependencies of UserFrosting are met and display useful debugging information. \nIf any error occurs, check out the online documentation for more info about that error. \nThis command also provide the necessary tools to setup the database credentials"); + ->setDescription("Test the UserFrosting installation and setup the database") + ->setHelp("This command is used to check if the various dependencies of UserFrosting are met and display useful debugging information. \nIf any error occurs, check out the online documentation for more info about that error. \nThis command also provide the necessary tools to setup the database credentials"); } /** * {@inheritDoc} */ - protected function execute(InputInterface $input, OutputInterface $output) - { + protected function execute(InputInterface $input, OutputInterface $output) { // Display header, $this->io->title("UserFrosting"); $this->io->writeln("UserFrosing version : " . \UserFrosting\VERSION); @@ -67,11 +66,10 @@ class Debug extends BaseCommand * @access public * @return void */ - protected function checkPhpVersion() - { + protected function checkPhpVersion() { $this->io->writeln("PHP Version : " . phpversion()); if (version_compare(phpversion(), \UserFrosting\PHP_MIN_VERSION, '<')) { - $this->io->error("UserFrosting requires php version ".\UserFrosting\PHP_MIN_VERSION." or above. You'll need to update you PHP version before you can continue."); + $this->io->error("UserFrosting requires php version " . \UserFrosting\PHP_MIN_VERSION . " or above. You'll need to update you PHP version before you can continue."); exit(1); } } @@ -82,8 +80,7 @@ class Debug extends BaseCommand * @access public * @return void */ - protected function checkNodeVersion() - { + protected function checkNodeVersion() { $npmVersion = trim(exec('node -v')); $this->io->writeln("Node Version : $npmVersion"); @@ -99,8 +96,7 @@ class Debug extends BaseCommand * @access public * @return void */ - protected function checkNpmVersion() - { + protected function checkNpmVersion() { $npmVersion = trim(exec('npm -v')); $this->io->writeln("NPM Version : $npmVersion"); @@ -117,12 +113,11 @@ class Debug extends BaseCommand * @access protected * @return void */ - protected function listSprinkles() - { + protected function listSprinkles() { // Check for Sprinkles schema file $path = \UserFrosting\SPRINKLES_SCHEMA_FILE; $sprinklesFile = @file_get_contents($path); - if ($sprinklesFile === false) { + if ($sprinklesFile === FALSE) { $this->io->error("The file `$path` not found."); } @@ -145,8 +140,7 @@ class Debug extends BaseCommand * @access protected * @return void */ - protected function checkDatabase() - { + protected function checkDatabase() { $this->io->section("Testing database connection..."); try { @@ -166,8 +160,7 @@ class Debug extends BaseCommand * @access protected * @return void */ - protected function showConfig() - { + protected function showConfig() { // Get config $config = $this->ci->config; |