@@ -4,13 +4,13 @@  | 
                                                    ||
| 4 | 4 | use Symfony\Component\Debug\Debug;  | 
                                                        
| 5 | 5 | use Symfony\Component\Dotenv\Dotenv;  | 
                                                        
| 6 | 6 | |
| 7 | -require __DIR__.'/../vendor/autoload.php';  | 
                                                        |
| 7 | +require __DIR__ . '/../vendor/autoload.php';  | 
                                                        |
| 8 | 8 | |
| 9 | 9 |  if (!isset($_SERVER['APP_ENV'])) { | 
                                                        
| 10 | 10 |      if (!class_exists(Dotenv::class)) { | 
                                                        
| 11 | 11 |          throw new \RuntimeException('APP_ENV environment variable is not defined. You need to define environment variables for configuration or add "symfony/dotenv" as a Composer dependency to load variables from a .env file.'); | 
                                                        
| 12 | 12 | }  | 
                                                        
| 13 | - (new Dotenv())->load(__DIR__.'/../.env');  | 
                                                        |
| 13 | + (new Dotenv())->load(__DIR__ . '/../.env');  | 
                                                        |
| 14 | 14 | }  | 
                                                        
| 15 | 15 | |
| 16 | 16 | $env = $_SERVER['APP_ENV'] ?? 'dev';  | 
                                                        
@@ -2,4 +2,4 @@  | 
                                                    ||
| 2 | 2 | |
| 3 | 3 | require __DIR__ . '/container.php';  | 
                                                        
| 4 | 4 | |
| 5 | -$app['profiler.cache_dir'] = $app->getCacheDir().'/profiler';  | 
                                                        |
| 5 | +$app['profiler.cache_dir'] = $app->getCacheDir() . '/profiler';  | 
                                                        |
@@ -4,7 +4,7 @@  | 
                                                    ||
| 4 | 4 | |
| 5 | 5 | $app['db.options'] = [  | 
                                                        
| 6 | 6 | 'driver' => 'pdo_sqlite',  | 
                                                        
| 7 | - 'path' => $app->getCacheDir().'/test.db'  | 
                                                        |
| 7 | + 'path' => $app->getCacheDir() . '/test.db'  | 
                                                        |
| 8 | 8 | ];  | 
                                                        
| 9 | 9 | |
| 10 | 10 | $app['session.test'] = true;  | 
                                                        
@@ -2,7 +2,7 @@ discard block  | 
                                                    ||
| 2 | 2 | |
| 3 | 3 | use App\Entity\User;  | 
                                                        
| 4 | 4 | |
| 5 | -require __DIR__.'/security.php';  | 
                                                        |
| 5 | +require __DIR__ . '/security.php';  | 
                                                        |
| 6 | 6 | |
| 7 | 7 | $app['assets.version'] = 'v1';  | 
                                                        
| 8 | 8 | |
@@ -14,16 +14,16 @@ discard block  | 
                                                    ||
| 14 | 14 | 'dbname' => $_SERVER['APP_DATABASE_NAME']  | 
                                                        
| 15 | 15 | ];  | 
                                                        
| 16 | 16 | |
| 17 | -$app['monolog.logfile'] = $app->getLogDir().'/'.$app->getEnvironment().'.log';  | 
                                                        |
| 17 | +$app['monolog.logfile'] = $app->getLogDir() . '/' . $app->getEnvironment() . '.log';  | 
                                                        |
| 18 | 18 | |
| 19 | 19 | // https://github.com/dflydev/dflydev-doctrine-orm-service-provider  | 
                                                        
| 20 | -$app['orm.proxies_dir'] = $app->getCacheDir().'/doctrine/orm/proxies';  | 
                                                        |
| 20 | +$app['orm.proxies_dir'] = $app->getCacheDir() . '/doctrine/orm/proxies';  | 
                                                        |
| 21 | 21 | $app['orm.em.options'] = [  | 
                                                        
| 22 | 22 | 'mappings' => [  | 
                                                        
| 23 | 23 | [  | 
                                                        
| 24 | 24 | 'type' => 'annotation',  | 
                                                        
| 25 | 25 | 'namespace' => 'App\Entity',  | 
                                                        
| 26 | - 'path' => $app->getRootDir().'/src/Entity',  | 
                                                        |
| 26 | + 'path' => $app->getRootDir() . '/src/Entity',  | 
                                                        |
| 27 | 27 | 'use_simple_annotation_reader' => false  | 
                                                        
| 28 | 28 | ]  | 
                                                        
| 29 | 29 | ]  | 
                                                        
@@ -49,12 +49,12 @@ discard block  | 
                                                    ||
| 49 | 49 | 'auth_mode' => $_SERVER['APP_MAILER_AUTH_MODE']  | 
                                                        
| 50 | 50 | ];  | 
                                                        
| 51 | 51 | |
| 52 | -$app['translator.cache_dir'] = $app->getCacheDir().'/translations';  | 
                                                        |
| 52 | +$app['translator.cache_dir'] = $app->getCacheDir() . '/translations';  | 
                                                        |
| 53 | 53 | |
| 54 | 54 | $app['twig.options'] = [  | 
                                                        
| 55 | - 'cache' => $app->getCacheDir().'/twig'  | 
                                                        |
| 55 | + 'cache' => $app->getCacheDir() . '/twig'  | 
                                                        |
| 56 | 56 | ];  | 
                                                        
| 57 | 57 | |
| 58 | 58 | $app['twig.path'] = [  | 
                                                        
| 59 | - $app->getRootDir().'/templates'  | 
                                                        |
| 59 | + $app->getRootDir() . '/templates'  | 
                                                        |
| 60 | 60 | ];  | 
                                                        
@@ -10,7 +10,7 @@  | 
                                                    ||
| 10 | 10 |      if (!class_exists(Dotenv::class)) { | 
                                                        
| 11 | 11 |          throw new \RuntimeException('APP_TEST_ENV environment variable is not defined. You need to define environment variables for configuration or add "symfony/dotenv" as a Composer dependency to load variables from a .env file.'); | 
                                                        
| 12 | 12 | }  | 
                                                        
| 13 | - (new Dotenv())->load(__DIR__.'/../.env');  | 
                                                        |
| 13 | + (new Dotenv())->load(__DIR__ . '/../.env');  | 
                                                        |
| 14 | 14 | }  | 
                                                        
| 15 | 15 | |
| 16 | 16 | $env = $_SERVER['APP_TEST_ENV'] ?? 'test';  | 
                                                        
@@ -54,13 +54,13 @@ discard block  | 
                                                    ||
| 54 | 54 | |
| 55 | 55 | public function getCacheDir()  | 
                                                        
| 56 | 56 |      { | 
                                                        
| 57 | - return $this->getRootDir().'/var/cache/'.$this->environment;  | 
                                                        |
| 57 | + return $this->getRootDir() . '/var/cache/' . $this->environment;  | 
                                                        |
| 58 | 58 | }  | 
                                                        
| 59 | 59 | |
| 60 | 60 | public function getConfigurationDir()  | 
                                                        
| 61 | 61 |      { | 
                                                        
| 62 | 62 |          if (null === $this->configurationDir) { | 
                                                        
| 63 | - $this->configurationDir = $this->getRootDir().'/config';  | 
                                                        |
| 63 | + $this->configurationDir = $this->getRootDir() . '/config';  | 
                                                        |
| 64 | 64 | }  | 
                                                        
| 65 | 65 | |
| 66 | 66 | return $this->configurationDir;  | 
                                                        
@@ -73,7 +73,7 @@ discard block  | 
                                                    ||
| 73 | 73 | |
| 74 | 74 | public function getLogDir()  | 
                                                        
| 75 | 75 |      { | 
                                                        
| 76 | - return $this->getRootDir().'/var/log';  | 
                                                        |
| 76 | + return $this->getRootDir() . '/var/log';  | 
                                                        |
| 77 | 77 | }  | 
                                                        
| 78 | 78 | |
| 79 | 79 | public function getRootDir()  | 
                                                        
@@ -88,25 +88,25 @@ discard block  | 
                                                    ||
| 88 | 88 | public function loadConfiguration()  | 
                                                        
| 89 | 89 |      { | 
                                                        
| 90 | 90 | $app = $this;  | 
                                                        
| 91 | -        if (file_exists($this->getConfigurationDir().'/container.'.$app->getEnvironment().'.php')) { | 
                                                        |
| 92 | - require $this->getConfigurationDir().'/container.'.$app->getEnvironment().'.php';  | 
                                                        |
| 91 | +        if (file_exists($this->getConfigurationDir() . '/container.' . $app->getEnvironment() . '.php')) { | 
                                                        |
| 92 | + require $this->getConfigurationDir() . '/container.' . $app->getEnvironment() . '.php';  | 
                                                        |
| 93 | 93 |          } else { | 
                                                        
| 94 | - require $this->getConfigurationDir().'/container.php';  | 
                                                        |
| 94 | + require $this->getConfigurationDir() . '/container.php';  | 
                                                        |
| 95 | 95 | }  | 
                                                        
| 96 | 96 | }  | 
                                                        
| 97 | 97 | |
| 98 | 98 | public function loadRoutes()  | 
                                                        
| 99 | 99 |      { | 
                                                        
| 100 | 100 | $app = $this;  | 
                                                        
| 101 | - require $this->getConfigurationDir().'/routes.php';  | 
                                                        |
| 101 | + require $this->getConfigurationDir() . '/routes.php';  | 
                                                        |
| 102 | 102 | }  | 
                                                        
| 103 | 103 | |
| 104 | 104 | public function registerControllers()  | 
                                                        
| 105 | 105 |      { | 
                                                        
| 106 | -        if (file_exists($this->getConfigurationDir().'/controllers.php')) { | 
                                                        |
| 107 | - $controllers = require $this->getConfigurationDir().'/controllers.php';  | 
                                                        |
| 106 | +        if (file_exists($this->getConfigurationDir() . '/controllers.php')) { | 
                                                        |
| 107 | + $controllers = require $this->getConfigurationDir() . '/controllers.php';  | 
                                                        |
| 108 | 108 |              foreach ($controllers as $key => $class) { | 
                                                        
| 109 | -                $this[$key] = function ($app) use ($class) { | 
                                                        |
| 109 | +                $this[$key] = function($app) use ($class) { | 
                                                        |
| 110 | 110 | return new $class($app);  | 
                                                        
| 111 | 111 | };  | 
                                                        
| 112 | 112 | }  | 
                                                        
@@ -116,12 +116,12 @@ discard block  | 
                                                    ||
| 116 | 116 | public function registerHandlers()  | 
                                                        
| 117 | 117 |      { | 
                                                        
| 118 | 118 | $app = $this;  | 
                                                        
| 119 | - require $this->getConfigurationDir().'/handlers.php';  | 
                                                        |
| 119 | + require $this->getConfigurationDir() . '/handlers.php';  | 
                                                        |
| 120 | 120 | }  | 
                                                        
| 121 | 121 | |
| 122 | 122 | public function registerProviders()  | 
                                                        
| 123 | 123 |      { | 
                                                        
| 124 | - $providers = require $this->getConfigurationDir().'/providers.php';  | 
                                                        |
| 124 | + $providers = require $this->getConfigurationDir() . '/providers.php';  | 
                                                        |
| 125 | 125 |          foreach ($providers as $class => $environments) { | 
                                                        
| 126 | 126 |              if (isset($environments['all']) || isset($environments[$this->environment])) { | 
                                                        
| 127 | 127 | $this->register(new $class());  |