From 0e49487bb0a004d526eb41e7d3fb44b566441e34 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 28 Mar 2016 14:18:50 +0200 Subject: Remove some complexicity in InstallCommand --- src/Wallabag/CoreBundle/Command/InstallCommand.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/Wallabag/CoreBundle/Command') diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index 2d73a9ad..7c3d1c52 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php @@ -74,10 +74,9 @@ class InstallCommand extends ContainerAwareCommand $fulfilled = true; $label = 'PDO Drivers'; - if (extension_loaded('pdo_sqlite') || extension_loaded('pdo_mysql') || extension_loaded('pdo_pgsql')) { - $status = 'OK!'; - $help = ''; - } else { + $status = 'OK!'; + $help = ''; + if (!(extension_loaded('pdo_sqlite') || extension_loaded('pdo_mysql') || extension_loaded('pdo_pgsql'))) { $fulfilled = false; $status = 'ERROR!'; $help = 'Needs one of sqlite, mysql or pgsql PDO drivers'; @@ -88,11 +87,10 @@ class InstallCommand extends ContainerAwareCommand foreach ($this->functionExists as $functionRequired) { $label = ''.$functionRequired.''; + $status = 'OK!'; + $help = ''; - if (function_exists($functionRequired)) { - $status = 'OK!'; - $help = ''; - } else { + if (!function_exists($functionRequired)) { $fulfilled = false; $status = 'ERROR!'; $help = 'You need the '.$functionRequired.' function activated'; -- cgit v1.2.3