@@ -22,7 +22,7 @@ |
||
22 | 22 | exit('This script is only accessible from localhost.'); |
23 | 23 | } |
24 | 24 | |
25 | -require_once dirname(__FILE__).'/../var/SymfonyRequirements.php'; |
|
25 | +require_once dirname(__FILE__) . '/../var/SymfonyRequirements.php'; |
|
26 | 26 | |
27 | 27 | $symfonyRequirements = new SymfonyRequirements(); |
28 | 28 |
@@ -382,7 +382,10 @@ discard block |
||
382 | 382 | <?php if ($hasMinorProblems): ?> |
383 | 383 | <h2>Recommendations</h2> |
384 | 384 | <p> |
385 | - <?php if ($hasMajorProblems): ?>Additionally, to<?php else: ?>To<?php endif; ?> enhance your Symfony experience, |
|
385 | + <?php if ($hasMajorProblems): ?>Additionally, to<?php else { |
|
386 | + : ?>To<?php endif; |
|
387 | +} |
|
388 | +?> enhance your Symfony experience, |
|
386 | 389 | it’s recommended that you fix the following: |
387 | 390 | </p> |
388 | 391 | <ol> |
@@ -398,9 +401,12 @@ discard block |
||
398 | 401 | <p id="phpini">* |
399 | 402 | <?php if ($symfonyRequirements->getPhpIniConfigPath()): ?> |
400 | 403 | Changes to the <strong>php.ini</strong> file must be done in "<strong><?php echo $symfonyRequirements->getPhpIniConfigPath() ?></strong>". |
401 | - <?php else: ?> |
|
404 | + <?php else { |
|
405 | + : ?> |
|
402 | 406 | To change settings, create a "<strong>php.ini</strong>". |
403 | - <?php endif; ?> |
|
407 | + <?php endif; |
|
408 | +} |
|
409 | +?> |
|
404 | 410 | </p> |
405 | 411 | <?php endif; ?> |
406 | 412 |
@@ -2,9 +2,9 @@ |
||
2 | 2 | |
3 | 3 | use Symfony\Component\HttpFoundation\Request; |
4 | 4 | |
5 | -require __DIR__.'/../vendor/autoload.php'; |
|
5 | +require __DIR__ . '/../vendor/autoload.php'; |
|
6 | 6 | if (PHP_VERSION_ID < 70000) { |
7 | - include_once __DIR__.'/../var/bootstrap.php.cache'; |
|
7 | + include_once __DIR__ . '/../var/bootstrap.php.cache'; |
|
8 | 8 | } |
9 | 9 | |
10 | 10 | $kernel = new AppKernel('prod', true); |
@@ -15,10 +15,10 @@ |
||
15 | 15 | || !(in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'], true) || PHP_SAPI === 'cli-server') |
16 | 16 | ) { |
17 | 17 | header('HTTP/1.0 403 Forbidden'); |
18 | - exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.'); |
|
18 | + exit('You are not allowed to access this file. Check ' . basename(__FILE__) . ' for more information.'); |
|
19 | 19 | } |
20 | 20 | |
21 | -require __DIR__.'/../vendor/autoload.php'; |
|
21 | +require __DIR__ . '/../vendor/autoload.php'; |
|
22 | 22 | Debug::enable(); |
23 | 23 | |
24 | 24 | $kernel = new AppKernel('dev', true); |
@@ -27,7 +27,7 @@ |
||
27 | 27 | public function indexAction(Request $request) |
28 | 28 | { |
29 | 29 | return $this->render('home.twig', [ |
30 | - 'base_dir' => realpath($this->getParameter('kernel.project_dir')).DIRECTORY_SEPARATOR, |
|
30 | + 'base_dir' => realpath($this->getParameter('kernel.project_dir')) . DIRECTORY_SEPARATOR, |
|
31 | 31 | ]); |
32 | 32 | } |
33 | 33 | } |
@@ -60,7 +60,7 @@ |
||
60 | 60 | $languages = []; |
61 | 61 | foreach (glob(self::DICTIONARY_PATH . '*.json') as $file) { |
62 | 62 | $language = json_decode(file_get_contents($file), GLOB_BRACE); |
63 | - $languages += [ $language['self_name'] => substr(basename($file), 0, 2) ]; |
|
63 | + $languages += [$language['self_name'] => substr(basename($file), 0, 2)]; |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | return $languages; |
@@ -42,9 +42,9 @@ |
||
42 | 42 | */ |
43 | 43 | public function onKernelRequest(GetResponseEvent $event) |
44 | 44 | { |
45 | - /** $request = $event->getRequest(); |
|
45 | + /** $request = $event->getRequest(); |
|
46 | 46 | $route = $request->get('_route'); |
47 | - * |
|
47 | + * |
|
48 | 48 | $languageId = $request->cookies->has('lang') ? $request->cookies->get('lang') : substr($request->getPreferredLanguage(), 0, 2); |
49 | 49 | if (!in_array($languageId, $this->acceptedLocales)) |
50 | 50 | $languageId = $this->defaultLocale; |
@@ -58,6 +58,6 @@ |
||
58 | 58 | |
59 | 59 | public static function getSubscribedEvents() |
60 | 60 | { |
61 | - return [ KernelEvents::REQUEST => [['onKernelRequest', 200]] ]; |
|
61 | + return [KernelEvents::REQUEST => [['onKernelRequest', 200]]]; |
|
62 | 62 | } |
63 | 63 | } |
64 | 64 | \ No newline at end of file |
@@ -58,6 +58,6 @@ |
||
58 | 58 | |
59 | 59 | public static function getSubscribedEvents() |
60 | 60 | { |
61 | - return [ KernelEvents::REQUEST => [['onKernelRequest', 200]] ]; |
|
61 | + return [KernelEvents::REQUEST => [['onKernelRequest', 200]]]; |
|
62 | 62 | } |
63 | 63 | } |
64 | 64 | \ No newline at end of file |