@@ -112,8 +112,8 @@ |
||
112 | 112 | |
113 | 113 | /** |
114 | 114 | * Convenience shortcut to add a session flash message. |
115 | - * @param $type |
|
116 | - * @param $message |
|
115 | + * @param string $type |
|
116 | + * @param string $message |
|
117 | 117 | */ |
118 | 118 | public function addFlash($type, $message) |
119 | 119 | { |
@@ -94,7 +94,7 @@ |
||
94 | 94 | |
95 | 95 | /** |
96 | 96 | * @param $uid |
97 | - * @param $limit |
|
97 | + * @param integer $limit |
|
98 | 98 | * @return array |
99 | 99 | */ |
100 | 100 | private function getUnMigratedUsers($uid, $limit) |
@@ -49,7 +49,7 @@ |
||
49 | 49 | $request->getSession()->getFlashBag()->add('warning', implode('<hr>', $ini_warnings)); |
50 | 50 | } |
51 | 51 | |
52 | - $yamlDumper = new YamlDumper($this->container->get('kernel')->getRootDir() .'/config', 'custom_parameters.yml'); |
|
52 | + $yamlDumper = new YamlDumper($this->container->get('kernel')->getRootDir() . '/config', 'custom_parameters.yml'); |
|
53 | 53 | $yamlDumper->setParameter('upgrading', true); |
54 | 54 | $request->setLocale($this->container->getParameter('locale')); |
55 | 55 |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | public function __construct(ContainerInterface $container) |
45 | 45 | { |
46 | 46 | parent::__construct($container); |
47 | - $originalParameters = Yaml::parse(file_get_contents($this->container->get('kernel')->getRootDir() .'/config/parameters.yml')); |
|
48 | - $this->yamlManager = new YamlDumper($this->container->get('kernel')->getRootDir() .'/config', 'custom_parameters.yml'); |
|
47 | + $originalParameters = Yaml::parse(file_get_contents($this->container->get('kernel')->getRootDir() . '/config/parameters.yml')); |
|
48 | + $this->yamlManager = new YamlDumper($this->container->get('kernel')->getRootDir() . '/config', 'custom_parameters.yml'); |
|
49 | 49 | // load and set new default values from the original parameters.yml file into the custom_parameters.yml file. |
50 | 50 | $this->yamlManager->setParameters(array_merge($originalParameters['parameters'], $this->yamlManager->getParameters())); |
51 | 51 | $this->currentVersion = $this->container->getParameter(ZikulaKernel::CORE_INSTALLED_VERSION_PARAM); |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $stage = $request->request->get('stage'); |
57 | 57 | $this->yamlManager->setParameter('upgrading', true); |
58 | 58 | $status = $this->executeStage($stage); |
59 | - $response = ['status' => (bool) $status]; |
|
59 | + $response = ['status' => (bool)$status]; |
|
60 | 60 | if (is_array($status)) { |
61 | 61 | $response['results'] = $status; |
62 | 62 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | public function runSymfonyChecks($parameters = []) |
25 | 25 | { |
26 | 26 | try { |
27 | - $path = realpath(__DIR__.'/../../../../../var/SymfonyRequirements.php'); |
|
27 | + $path = realpath(__DIR__ . '/../../../../../var/SymfonyRequirements.php'); |
|
28 | 28 | require $path; |
29 | 29 | $symfonyRequirements = new \SymfonyRequirements(); |
30 | 30 | $this->addZikulaPathRequirements($symfonyRequirements, $parameters); |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | if ($requirement->isFulfilled()) { |
45 | 45 | return; |
46 | 46 | } |
47 | - $errorMessage = wordwrap($requirement->getTestMessage(), $lineSize - 3, PHP_EOL.' ').PHP_EOL; |
|
48 | - $errorMessage .= ' > '.wordwrap($requirement->getHelpText(), $lineSize - 5, PHP_EOL.' > ').PHP_EOL; |
|
47 | + $errorMessage = wordwrap($requirement->getTestMessage(), $lineSize - 3, PHP_EOL . ' ') . PHP_EOL; |
|
48 | + $errorMessage .= ' > ' . wordwrap($requirement->getHelpText(), $lineSize - 5, PHP_EOL . ' > ') . PHP_EOL; |
|
49 | 49 | |
50 | 50 | return $errorMessage; |
51 | 51 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $symfonyRequirements->addRequirement( |
67 | 67 | is_writable($src . '/' . $parameters['datadir']), |
68 | 68 | $parameters['datadir'] . '/ directory must be writable', |
69 | - 'Change the permissions of "<strong>' . $parameters['datadir']. '</strong>" directory so that the web server can write into it.' |
|
69 | + 'Change the permissions of "<strong>' . $parameters['datadir'] . '</strong>" directory so that the web server can write into it.' |
|
70 | 70 | ); |
71 | 71 | $customParametersPath = $src . '/app/config/custom_parameters.yml'; |
72 | 72 | if (file_exists($customParametersPath)) { |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $count = $migrationHelper->countUnMigratedUsers(); |
98 | 98 | if ($count > 0) { |
99 | 99 | $io->text($this->translator->__('Beginning user migration...')); |
100 | - $userMigrationMaxuid = (int) $migrationHelper->getMaxUnMigratedUid(); |
|
100 | + $userMigrationMaxuid = (int)$migrationHelper->getMaxUnMigratedUid(); |
|
101 | 101 | $progressBar = new ProgressBar($output, ceil($count / MigrationHelper::BATCH_LIMIT)); |
102 | 102 | $progressBar->start(); |
103 | 103 | $lastUid = 0; |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $io->newLine(); |
134 | 134 | |
135 | 135 | // write the parameters to custom_parameters.yml |
136 | - $yamlManager = new YamlDumper($this->getContainer()->get('kernel')->getRootDir() .'/config', 'custom_parameters.yml'); |
|
136 | + $yamlManager = new YamlDumper($this->getContainer()->get('kernel')->getRootDir() . '/config', 'custom_parameters.yml'); |
|
137 | 137 | $params = array_merge($yamlManager->getParameters(), $settings); |
138 | 138 | unset($params['upgrading']); |
139 | 139 | $yamlManager->setParameters($params); |