$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';
}
- $rows[] = array($label, $status, $help);
+ $rows = [];
+ $rows[] = [$label, $status, $help];
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';
}
- $rows[] = array($label, $status, $help);
+ $rows[] = [$label, $status, $help];
}
$table = new Table($this->defaultOutput);
$table
- ->setHeaders(array('Checked', 'Status', 'Recommendation'))
+ ->setHeaders(['Checked', 'Status', 'Recommendation'])
->setRows($rows)
->render();
$this->defaultOutput->writeln('Droping database, creating database and schema, clearing the cache');
$this
- ->runCommand('doctrine:database:drop', array('--force' => true))
+ ->runCommand('doctrine:database:drop', ['--force' => true])
->runCommand('doctrine:database:create')
->runCommand('doctrine:schema:create')
->runCommand('cache:clear')
$this->defaultOutput->writeln('Droping database, creating database and schema');
$this
- ->runCommand('doctrine:database:drop', array('--force' => true))
+ ->runCommand('doctrine:database:drop', ['--force' => true])
->runCommand('doctrine:database:create')
->runCommand('doctrine:schema:create')
;
$this->defaultOutput->writeln('Droping schema and creating schema');
$this
- ->runCommand('doctrine:schema:drop', array('--force' => true))
+ ->runCommand('doctrine:schema:drop', ['--force' => true])
->runCommand('doctrine:schema:create')
;
}
$config->setTheme($this->getContainer()->getParameter('wallabag_core.theme'));
$config->setItemsPerPage($this->getContainer()->getParameter('wallabag_core.items_on_page'));
$config->setRssLimit($this->getContainer()->getParameter('wallabag_core.rss_limit'));
+ $config->setReadingSpeed($this->getContainer()->getParameter('wallabag_core.reading_speed'));
$config->setLanguage($this->getContainer()->getParameter('wallabag_core.language'));
$em->persist($config);
* @param string $command
* @param array $parameters Parameters to this command (usually 'force' => true)
*/
- protected function runCommand($command, $parameters = array())
+ protected function runCommand($command, $parameters = [])
{
$parameters = array_merge(
- array('command' => $command),
+ ['command' => $command],
$parameters,
- array(
+ [
'--no-debug' => true,
'--env' => $this->defaultInput->getOption('env') ?: 'dev',
- )
+ ]
);
if ($this->defaultInput->getOption('no-interaction')) {
- $parameters = array_merge($parameters, array('--no-interaction' => true));
+ $parameters = array_merge($parameters, ['--no-interaction' => true]);
}
$this->getApplication()->setAutoExit(false);