@@ -45,7 +45,7 @@ |
||
| 45 | 45 | public function __construct(ContainerInterface $container) |
| 46 | 46 | { |
| 47 | 47 | $this->container = $container; |
| 48 | - $this->yamlManager = new YamlDumper($this->container->get('kernel')->getRootDir() .'/config', 'custom_parameters.yml', 'parameters.yml'); |
|
| 48 | + $this->yamlManager = new YamlDumper($this->container->get('kernel')->getRootDir() . '/config', 'custom_parameters.yml', 'parameters.yml'); |
|
| 49 | 49 | $this->installedLanguages = \ZLanguage::getInstalledLanguages(); |
| 50 | 50 | $detector = new \ZLanguageBrowser($this->installedLanguages); |
| 51 | 51 | $this->matchedLocale = $detector->discover(); |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | public function runSymfonyChecks($parameters = []) |
| 25 | 25 | { |
| 26 | 26 | try { |
| 27 | - $path = realpath(__DIR__.'/../../../../../app/SymfonyRequirements.php'); |
|
| 27 | + $path = realpath(__DIR__ . '/../../../../../app/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 | // @todo @deprecated |
| 72 | 72 | $symfonyRequirements->addRequirement( |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | $conn = $container->get('doctrine.dbal.default_connection'); |
| 37 | 37 | $version = unserialize($conn->fetchColumn("SELECT value FROM module_vars WHERE modname = 'ZConfig' AND name = 'Version_Num'")); |
| 38 | 38 | |
| 39 | - $yamlManager = new YamlDumper($container->get('kernel')->getRootDir() .'/config', 'custom_parameters.yml'); |
|
| 39 | + $yamlManager = new YamlDumper($container->get('kernel')->getRootDir() . '/config', 'custom_parameters.yml'); |
|
| 40 | 40 | $container->setParameter(\Zikula_Core::CORE_INSTALLED_VERSION_PARAM, $version); |
| 41 | 41 | $yamlManager->setParameter(\Zikula_Core::CORE_INSTALLED_VERSION_PARAM, $version); // writes to file |
| 42 | 42 | } catch (\Doctrine\DBAL\Exception\TableNotFoundException $e) { |
@@ -112,7 +112,7 @@ |
||
| 112 | 112 | $settings = array_merge($settings, $data); |
| 113 | 113 | |
| 114 | 114 | // write the parameters to custom_parameters.yml |
| 115 | - $yamlManager = new YamlDumper($this->getContainer()->get('kernel')->getRootDir() .'/config', 'custom_parameters.yml'); |
|
| 115 | + $yamlManager = new YamlDumper($this->getContainer()->get('kernel')->getRootDir() . '/config', 'custom_parameters.yml'); |
|
| 116 | 116 | $params = array_merge($yamlManager->getParameters(), $settings); |
| 117 | 117 | $yamlManager->setParameters($params); |
| 118 | 118 | |
@@ -117,7 +117,7 @@ |
||
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | // write the parameters to personal_config.php and custom_parameters.yml |
| 120 | - $yamlManager = new YamlDumper($this->getContainer()->get('kernel')->getRootDir() .'/config', 'custom_parameters.yml', 'parameters.yml'); |
|
| 120 | + $yamlManager = new YamlDumper($this->getContainer()->get('kernel')->getRootDir() . '/config', 'custom_parameters.yml', 'parameters.yml'); |
|
| 121 | 121 | $params = array_merge($yamlManager->getParameters(), $settings); |
| 122 | 122 | $dbh = new \PDO("$params[database_driver]:host=$params[database_host];dbname=$params[database_name]", $params['database_user'], $params['database_password']); |
| 123 | 123 | $params['database_server_version'] = $dbh->getAttribute(\PDO::ATTR_SERVER_VERSION); |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | $containsUpgrade = $routeInfo['_route'] == 'upgrade'; |
| 49 | 49 | $containsLogin = $routeInfo['_controller'] == 'Zikula\\UsersModule\\Controller\\AccessController::loginAction' || $routeInfo['_controller'] == 'Zikula\\UsersModule\\Controller\\AccessController::upgradeAdminLoginAction'; // @todo @deprecated at Core-2.0 remove later half |
| 50 | 50 | $containsDoc = $routeInfo['_route'] == 'doc'; |
| 51 | - $containsWdt = $routeInfo['_route'] == '_wdt'; |
|
| 51 | + $containsWdt = $routeInfo['_route'] == '_wdt'; |
|
| 52 | 52 | $containsProfiler = strpos($routeInfo['_route'], '_profiler') !== false; |
| 53 | 53 | $containsRouter = $routeInfo['_route'] == 'fos_js_routing_js'; |
| 54 | 54 | $doNotRedirect = $containsProfiler || $containsWdt || $containsRouter || $request->isXmlHttpRequest(); |
@@ -124,7 +124,7 @@ |
||
| 124 | 124 | $domain = $args->hasNode($domainNode) ? $args->getNode($domainNode)->getAttribute('value') : $domain; |
| 125 | 125 | |
| 126 | 126 | $message = new Message($id, $domain); |
| 127 | - $message->addSource(new FileSource((string) $this->file, $node->getTemplateLine())); |
|
| 127 | + $message->addSource(new FileSource((string)$this->file, $node->getTemplateLine())); |
|
| 128 | 128 | $this->catalogue->add($message); |
| 129 | 129 | } |
| 130 | 130 | } |
@@ -75,10 +75,10 @@ |
||
| 75 | 75 | $this->writer->writeln('#: ' . $source); |
| 76 | 76 | } |
| 77 | 77 | if ($desc) { |
| 78 | - $this->writer->writeln('# Desc: '.$desc); |
|
| 78 | + $this->writer->writeln('# Desc: ' . $desc); |
|
| 79 | 79 | } |
| 80 | 80 | if ($meaning) { |
| 81 | - $this->writer->writeln('# Meaning: '.$meaning); |
|
| 81 | + $this->writer->writeln('# Meaning: ' . $meaning); |
|
| 82 | 82 | } |
| 83 | 83 | $this->writer->writeln('msgid "' . $v->getId() . '"') |
| 84 | 84 | ->writeln('msgstr ""'); |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | { |
| 94 | 94 | $expected = new MessageCatalogue(); |
| 95 | 95 | $fileSourceFactory = $this->getFileSourceFactory(); |
| 96 | - $fixtureSplInfo = new \SplFileInfo('/' . __DIR__ . '/Fixture/delete.html.twig'); // extra slash in path is necessary :( |
|
| 96 | + $fixtureSplInfo = new \SplFileInfo('/' . __DIR__ . '/Fixture/delete.html.twig'); // extra slash in path is necessary :( |
|
| 97 | 97 | |
| 98 | 98 | $message = new Message('Delete block position', 'zikula'); |
| 99 | 99 | $message->addSource($fileSourceFactory->create($fixtureSplInfo, 9)); |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | |
| 113 | 113 | private function extract($file, ZikulaTwigFileExtractor $extractor = null) |
| 114 | 114 | { |
| 115 | - if (!is_file($file = __DIR__.'/Fixture/'.$file)) { |
|
| 115 | + if (!is_file($file = __DIR__ . '/Fixture/' . $file)) { |
|
| 116 | 116 | throw new RuntimeException(sprintf('The file "%s" does not exist.', $file)); |
| 117 | 117 | } |
| 118 | 118 | $kernel = $this |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | ->getMock(); |
| 122 | 122 | $kernel |
| 123 | 123 | ->method('getBundle') |
| 124 | - ->will($this->returnCallback(function ($bundleName) { |
|
| 124 | + ->will($this->returnCallback(function($bundleName) { |
|
| 125 | 125 | $bundle = $this |
| 126 | 126 | ->getMockBuilder('Zikula\Core\AbstractBundle') |
| 127 | 127 | ->disableOriginalConstructor() |