@@ -417,13 +417,13 @@ discard block |
||
| 417 | 417 | ); |
| 418 | 418 | |
| 419 | 419 | $this->addRequirement( |
| 420 | - is_dir(__DIR__.'/../vendor/composer'), |
|
| 420 | + is_dir(__DIR__ . '/../vendor/composer'), |
|
| 421 | 421 | 'Vendor libraries must be installed', |
| 422 | - 'Vendor libraries are missing. Install composer following instructions from <a href="http://getcomposer.org/">http://getcomposer.org/</a>. '. |
|
| 422 | + 'Vendor libraries are missing. Install composer following instructions from <a href="http://getcomposer.org/">http://getcomposer.org/</a>. ' . |
|
| 423 | 423 | 'Then run "<strong>php composer.phar install</strong>" to install them.' |
| 424 | 424 | ); |
| 425 | 425 | |
| 426 | - $cacheDir = is_dir(__DIR__.'/../var/cache') ? __DIR__.'/../var/cache' : __DIR__.'/cache'; |
|
| 426 | + $cacheDir = is_dir(__DIR__ . '/../var/cache') ? __DIR__ . '/../var/cache' : __DIR__ . '/cache'; |
|
| 427 | 427 | |
| 428 | 428 | $this->addRequirement( |
| 429 | 429 | is_writable($cacheDir), |
@@ -431,7 +431,7 @@ discard block |
||
| 431 | 431 | 'Change the permissions of either "<strong>app/cache/</strong>" or "<strong>var/cache/</strong>" directory so that the web server can write into it.' |
| 432 | 432 | ); |
| 433 | 433 | |
| 434 | - $logsDir = is_dir(__DIR__.'/../var/logs') ? __DIR__.'/../var/logs' : __DIR__.'/logs'; |
|
| 434 | + $logsDir = is_dir(__DIR__ . '/../var/logs') ? __DIR__ . '/../var/logs' : __DIR__ . '/logs'; |
|
| 435 | 435 | |
| 436 | 436 | $this->addRequirement( |
| 437 | 437 | is_writable($logsDir), |
@@ -564,13 +564,13 @@ discard block |
||
| 564 | 564 | |
| 565 | 565 | /* optional recommendations follow */ |
| 566 | 566 | |
| 567 | - if (file_exists(__DIR__.'/../vendor/composer')) { |
|
| 568 | - require_once __DIR__.'/../vendor/autoload.php'; |
|
| 567 | + if (file_exists(__DIR__ . '/../vendor/composer')) { |
|
| 568 | + require_once __DIR__ . '/../vendor/autoload.php'; |
|
| 569 | 569 | |
| 570 | 570 | try { |
| 571 | 571 | $r = new ReflectionClass('Sensio\Bundle\DistributionBundle\SensioDistributionBundle'); |
| 572 | 572 | |
| 573 | - $contents = file_get_contents(dirname($r->getFileName()).'/Resources/skeleton/app/SymfonyRequirements.php'); |
|
| 573 | + $contents = file_get_contents(dirname($r->getFileName()) . '/Resources/skeleton/app/SymfonyRequirements.php'); |
|
| 574 | 574 | } catch (ReflectionException $e) { |
| 575 | 575 | $contents = ''; |
| 576 | 576 | } |
@@ -798,7 +798,7 @@ discard block |
||
| 798 | 798 | */ |
| 799 | 799 | protected function getPhpRequiredVersion() |
| 800 | 800 | { |
| 801 | - if (!file_exists($path = __DIR__.'/../composer.lock')) { |
|
| 801 | + if (!file_exists($path = __DIR__ . '/../composer.lock')) { |
|
| 802 | 802 | return false; |
| 803 | 803 | } |
| 804 | 804 | |
@@ -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 | |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | throw new \LogicException('You can not use the addFlash method if sessions are disabled.'); |
| 20 | 20 | } |
| 21 | 21 | if (!$message) { |
| 22 | - $message = $this->get('translator')->trans('flash.'.$type.'.message', [], 'common'); |
|
| 22 | + $message = $this->get('translator')->trans('flash.' . $type . '.message', [], 'common'); |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | $this->container->get('session')->getFlashBag()->add($type, $message); |
@@ -27,9 +27,9 @@ |
||
| 27 | 27 | $video = new Video(); |
| 28 | 28 | $video->setTitle($videoData['title']); |
| 29 | 29 | $video->setDescription($videoData['title']); |
| 30 | - $filePath = __DIR__.'/../Data/test.mp4'; |
|
| 30 | + $filePath = __DIR__ . '/../Data/test.mp4'; |
|
| 31 | 31 | $fileName = \filter_var($videoData['title'], FILTER_SANITIZE_EMAIL); |
| 32 | - $targetfilePath = __DIR__.'/../Data/'.$fileName.'mp4'; |
|
| 32 | + $targetfilePath = __DIR__ . '/../Data/' . $fileName . 'mp4'; |
|
| 33 | 33 | $fs->copy($filePath, $targetfilePath); |
| 34 | 34 | $video->setVideoFile(new UploadedFile($targetfilePath, 'test.mp4', 'video/mp4', null, null, true)); |
| 35 | 35 | $video->setCreator($this->getReference($users[array_rand($users)]['firstName'])); |
@@ -2,11 +2,11 @@ |
||
| 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 | -(new \Symfony\Component\Dotenv\Dotenv())->load(__DIR__.'/../.env'); |
|
| 9 | +(new \Symfony\Component\Dotenv\Dotenv())->load(__DIR__ . '/../.env'); |
|
| 10 | 10 | |
| 11 | 11 | $kernel = new AppKernel('prod', false); |
| 12 | 12 | if (PHP_VERSION_ID < 70000) { |
@@ -19,9 +19,9 @@ |
||
| 19 | 19 | // exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.'); |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | -require __DIR__.'/../vendor/autoload.php'; |
|
| 22 | +require __DIR__ . '/../vendor/autoload.php'; |
|
| 23 | 23 | Debug::enable(); |
| 24 | -(new \Symfony\Component\Dotenv\Dotenv())->load(__DIR__.'/../.env'); |
|
| 24 | +(new \Symfony\Component\Dotenv\Dotenv())->load(__DIR__ . '/../.env'); |
|
| 25 | 25 | |
| 26 | 26 | $kernel = new AppKernel('dev', true); |
| 27 | 27 | if (PHP_VERSION_ID < 70000) { |