From: Jeremy Benoist Date: Mon, 28 Mar 2016 12:18:50 +0000 (+0200) Subject: Remove some complexicity in InstallCommand X-Git-Tag: 2.0.0~5^2~1 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=0e49487bb0a004d526eb41e7d3fb44b566441e34;p=github%2Fwallabag%2Fwallabag.git Remove some complexicity in InstallCommand --- 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'; diff --git a/src/Wallabag/CoreBundle/Helper/EntriesExport.php b/src/Wallabag/CoreBundle/Helper/EntriesExport.php index 82004a6d..d0680c3f 100644 --- a/src/Wallabag/CoreBundle/Helper/EntriesExport.php +++ b/src/Wallabag/CoreBundle/Helper/EntriesExport.php @@ -367,6 +367,8 @@ class EntriesExport /** * Return a Serializer object for producing processes that need it (JSON & XML). * + * @param string $format + * * @return Serializer */ private function prepareSerializingContent($format)