X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FCommand%2FInstallCommand.php;h=50e19f0c7e3653b7fc72facde07c8d42b397e6e2;hb=879f8eaa1857f250a8defe058f3bcf23d4045508;hp=a56a32575671d4ae350fea82a05403f648fdb2ef;hpb=f565e10817465c8bfc8fe93004173ffcc29ccf95;p=github%2Fwallabag%2Fwallabag.git
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php
index a56a3257..50e19f0c 100644
--- a/src/Wallabag/CoreBundle/Command/InstallCommand.php
+++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php
@@ -54,7 +54,7 @@ class InstallCommand extends ContainerAwareCommand
$this->io = new SymfonyStyle($input, $output);
- $this->io->title('Wallabag installer');
+ $this->io->title('wallabag installer');
$this
->checkRequirements()
@@ -63,7 +63,7 @@ class InstallCommand extends ContainerAwareCommand
->setupConfig()
;
- $this->io->success('Wallabag has been successfully installed.');
+ $this->io->success('wallabag has been successfully installed.');
$this->io->success('You can now configure your web server, see https://doc.wallabag.org');
}
@@ -81,7 +81,7 @@ class InstallCommand extends ContainerAwareCommand
$status = 'OK!';
$help = '';
- if (!extension_loaded($this->getContainer()->getParameter('database_driver'))) {
+ if (!\extension_loaded($this->getContainer()->getParameter('database_driver'))) {
$fulfilled = false;
$status = 'ERROR!';
$help = 'Database driver "' . $this->getContainer()->getParameter('database_driver') . '" is not installed.';
@@ -94,8 +94,9 @@ class InstallCommand extends ContainerAwareCommand
$status = 'OK!';
$help = '';
+ $conn = $this->getContainer()->get('doctrine')->getManager()->getConnection();
+
try {
- $conn = $this->getContainer()->get('doctrine')->getManager()->getConnection();
$conn->connect();
} catch (\Exception $e) {
if (false === strpos($e->getMessage(), 'Unknown database')
@@ -146,7 +147,7 @@ class InstallCommand extends ContainerAwareCommand
$status = 'OK!';
$help = '';
- if (!function_exists($functionRequired)) {
+ if (!\function_exists($functionRequired)) {
$fulfilled = false;
$status = 'ERROR!';
$help = 'You need the ' . $functionRequired . ' function activated';
@@ -253,7 +254,7 @@ class InstallCommand extends ContainerAwareCommand
$question->setHidden(true);
$user->setPlainPassword($this->io->askQuestion($question));
- $user->setEmail($this->io->ask('Email', ''));
+ $user->setEmail($this->io->ask('Email', 'wallabag@wallabag.io'));
$user->setEnabled(true);
$user->addRole('ROLE_SUPER_ADMIN');
@@ -371,7 +372,7 @@ class InstallCommand extends ContainerAwareCommand
}
try {
- return in_array($databaseName, $schemaManager->listDatabases(), true);
+ return \in_array($databaseName, $schemaManager->listDatabases(), true);
} catch (\Doctrine\DBAL\Exception\DriverException $e) {
// it means we weren't able to get database list, assume the database doesn't exist
@@ -389,6 +390,6 @@ class InstallCommand extends ContainerAwareCommand
{
$schemaManager = $this->getContainer()->get('doctrine')->getManager()->getConnection()->getSchemaManager();
- return count($schemaManager->listTableNames()) > 0 ? true : false;
+ return \count($schemaManager->listTableNames()) > 0 ? true : false;
}
}