Remove some complexicity in InstallCommand
This commit is contained in:
parent
ba2157b270
commit
0e49487bb0
@ -74,10 +74,9 @@ class InstallCommand extends ContainerAwareCommand
|
|||||||
$fulfilled = true;
|
$fulfilled = true;
|
||||||
|
|
||||||
$label = '<comment>PDO Drivers</comment>';
|
$label = '<comment>PDO Drivers</comment>';
|
||||||
if (extension_loaded('pdo_sqlite') || extension_loaded('pdo_mysql') || extension_loaded('pdo_pgsql')) {
|
$status = '<info>OK!</info>';
|
||||||
$status = '<info>OK!</info>';
|
$help = '';
|
||||||
$help = '';
|
if (!(extension_loaded('pdo_sqlite') || extension_loaded('pdo_mysql') || extension_loaded('pdo_pgsql'))) {
|
||||||
} else {
|
|
||||||
$fulfilled = false;
|
$fulfilled = false;
|
||||||
$status = '<error>ERROR!</error>';
|
$status = '<error>ERROR!</error>';
|
||||||
$help = 'Needs one of sqlite, mysql or pgsql PDO drivers';
|
$help = 'Needs one of sqlite, mysql or pgsql PDO drivers';
|
||||||
@ -88,11 +87,10 @@ class InstallCommand extends ContainerAwareCommand
|
|||||||
|
|
||||||
foreach ($this->functionExists as $functionRequired) {
|
foreach ($this->functionExists as $functionRequired) {
|
||||||
$label = '<comment>'.$functionRequired.'</comment>';
|
$label = '<comment>'.$functionRequired.'</comment>';
|
||||||
|
$status = '<info>OK!</info>';
|
||||||
|
$help = '';
|
||||||
|
|
||||||
if (function_exists($functionRequired)) {
|
if (!function_exists($functionRequired)) {
|
||||||
$status = '<info>OK!</info>';
|
|
||||||
$help = '';
|
|
||||||
} else {
|
|
||||||
$fulfilled = false;
|
$fulfilled = false;
|
||||||
$status = '<error>ERROR!</error>';
|
$status = '<error>ERROR!</error>';
|
||||||
$help = 'You need the '.$functionRequired.' function activated';
|
$help = 'You need the '.$functionRequired.' function activated';
|
||||||
|
@ -367,6 +367,8 @@ class EntriesExport
|
|||||||
/**
|
/**
|
||||||
* Return a Serializer object for producing processes that need it (JSON & XML).
|
* Return a Serializer object for producing processes that need it (JSON & XML).
|
||||||
*
|
*
|
||||||
|
* @param string $format
|
||||||
|
*
|
||||||
* @return Serializer
|
* @return Serializer
|
||||||
*/
|
*/
|
||||||
private function prepareSerializingContent($format)
|
private function prepareSerializingContent($format)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user