Remove some complexicity in InstallCommand

This commit is contained in:
Jeremy Benoist 2016-03-28 14:18:50 +02:00
parent ba2157b270
commit 0e49487bb0
2 changed files with 8 additions and 8 deletions

View file

@ -74,10 +74,9 @@ class InstallCommand extends ContainerAwareCommand
$fulfilled = true;
$label = '<comment>PDO Drivers</comment>';
if (extension_loaded('pdo_sqlite') || extension_loaded('pdo_mysql') || extension_loaded('pdo_pgsql')) {
$status = '<info>OK!</info>';
$help = '';
} else {
$status = '<info>OK!</info>';
$help = '';
if (!(extension_loaded('pdo_sqlite') || extension_loaded('pdo_mysql') || extension_loaded('pdo_pgsql'))) {
$fulfilled = false;
$status = '<error>ERROR!</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 = '<comment>'.$functionRequired.'</comment>';
$status = '<info>OK!</info>';
$help = '';
if (function_exists($functionRequired)) {
$status = '<info>OK!</info>';
$help = '';
} else {
if (!function_exists($functionRequired)) {
$fulfilled = false;
$status = '<error>ERROR!</error>';
$help = 'You need the '.$functionRequired.' function activated';

View file

@ -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)