diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php
index 84bd51fa2..f1111cce6 100644
--- a/src/Wallabag/CoreBundle/Command/InstallCommand.php
+++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php
@@ -26,6 +26,14 @@ class InstallCommand extends ContainerAwareCommand
*/
protected $defaultOutput;
+ /**
+ * @var array
+ */
+ protected $requirements = [
+ 'pcre',
+ 'DOM',
+ ];
+
protected function configure()
{
$this
@@ -65,27 +73,18 @@ class InstallCommand extends ContainerAwareCommand
$fulfilled = true;
- $label = 'PCRE';
- if (extension_loaded('pcre')) {
- $status = 'OK!';
- $help = '';
- } else {
- $fulfilled = false;
- $status = 'ERROR!';
- $help = 'You should enabled PCRE extension';
+ foreach ($this->requirements as $requirement) {
+ $label = ''.strtoupper($requirement).'';
+ if (extension_loaded($requirement)) {
+ $status = 'OK!';
+ $help = '';
+ } else {
+ $fulfilled = false;
+ $status = 'ERROR!';
+ $help = 'You should enabled '.$requirement.' extension';
+ }
+ $rows[] = array($label, $status, $help);
}
- $rows[] = array($label, $status, $help);
-
- $label = 'DOM';
- if (extension_loaded('DOM')) {
- $status = 'OK!';
- $help = '';
- } else {
- $fulfilled = false;
- $status = 'ERROR!';
- $help = 'You should enabled DOM extension';
- }
- $rows[] = array($label, $status, $help);
$table = new Table($this->defaultOutput);
$table