@@ -10,7 +10,7 @@ discard block |
||
| 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 | if ($debug = $_SERVER['APP_DEBUG'] ?? ('prod' !== ($_SERVER['APP_ENV'] ?? 'dev'))) { |
@@ -31,6 +31,6 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | require __DIR__ . '/../config/routes.php'; |
| 33 | 33 | |
| 34 | -require __DIR__.'/../config/handlers.php'; |
|
| 34 | +require __DIR__ . '/../config/handlers.php'; |
|
| 35 | 35 | |
| 36 | 36 | return $app; |
@@ -4,13 +4,13 @@ discard block |
||
| 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 | if ($debug = $_SERVER['APP_DEBUG'] ?? ('prod' !== ($_SERVER['APP_ENV'] ?? 'dev'))) { |
@@ -23,18 +23,18 @@ discard block |
||
| 23 | 23 | $app['env'] = $_SERVER['APP_ENV'] ?? 'dev'; |
| 24 | 24 | $app['root_dir'] = dirname(__DIR__); |
| 25 | 25 | |
| 26 | -require __DIR__.'/../config/providers.php'; |
|
| 26 | +require __DIR__ . '/../config/providers.php'; |
|
| 27 | 27 | |
| 28 | -if (file_exists(__DIR__.'/../config/config.'.$app['env'].'.php')) { |
|
| 29 | - require __DIR__.'/../config/config.'.$app['env'].'.php'; |
|
| 28 | +if (file_exists(__DIR__ . '/../config/config.' . $app['env'] . '.php')) { |
|
| 29 | + require __DIR__ . '/../config/config.' . $app['env'] . '.php'; |
|
| 30 | 30 | } else { |
| 31 | - require __DIR__.'/../config/config.php'; |
|
| 31 | + require __DIR__ . '/../config/config.php'; |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | -require __DIR__.'/../config/controllers.php'; |
|
| 34 | +require __DIR__ . '/../config/controllers.php'; |
|
| 35 | 35 | |
| 36 | -require __DIR__.'/../config/routes.php'; |
|
| 36 | +require __DIR__ . '/../config/routes.php'; |
|
| 37 | 37 | |
| 38 | -require __DIR__.'/../config/handlers.php'; |
|
| 38 | +require __DIR__ . '/../config/handlers.php'; |
|
| 39 | 39 | |
| 40 | 40 | $app->run(); |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | 'invalidate_session' => true |
| 21 | 21 | ], |
| 22 | 22 | 'anonymous' => true, |
| 23 | - 'users' => function ($app) { |
|
| 23 | + 'users' => function($app) { |
|
| 24 | 24 | return $app['silex_user.user_provider.username_email']; |
| 25 | 25 | } |
| 26 | 26 | ] |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | ]; |
| 6 | 6 | |
| 7 | 7 | foreach ($controllers as $key => $class) { |
| 8 | - $app[$key] = function () use ($app, $class) { |
|
| 8 | + $app[$key] = function() use ($app, $class) { |
|
| 9 | 9 | return new $class($app); |
| 10 | 10 | }; |
| 11 | 11 | } |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | use Symfony\Component\HttpFoundation\Request; |
| 4 | 4 | use Symfony\Component\HttpFoundation\Response; |
| 5 | 5 | |
| 6 | -$app->error(function (Exception $e, Request $request, $code) use ($app) { |
|
| 6 | +$app->error(function(Exception $e, Request $request, $code) use ($app) { |
|
| 7 | 7 | $templates = [ |
| 8 | 8 | 'error/' . $code . '.twig', |
| 9 | 9 | 'error/' . substr($code, 0, 1) . 'xx.twig', |