Completed
Push — master ( 8b56fb...559338 )
by Alexis
04:20
created
config/security.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
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
     ]
Please login to merge, or discard this patch.
config/handlers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
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',
Please login to merge, or discard this patch.
public/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,13 +4,13 @@
 block discarded – undo
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';
Please login to merge, or discard this patch.
tests/app.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
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';
Please login to merge, or discard this patch.
src/Application.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -49,12 +49,12 @@  discard block
 block discarded – undo
49 49
 
50 50
     public function getCacheDir()
51 51
     {
52
-        return $this->getRootDir().'/var/cache/'.$this->environment;
52
+        return $this->getRootDir() . '/var/cache/' . $this->environment;
53 53
     }
54 54
 
55 55
     public function getConfigurationDir()
56 56
     {
57
-        return $this->getRootDir().'/config';
57
+        return $this->getRootDir() . '/config';
58 58
     }
59 59
 
60 60
     public function getEnvironment()
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
     public function getLogDir()
66 66
     {
67
-        return $this->getRootDir().'/var/log';
67
+        return $this->getRootDir() . '/var/log';
68 68
     }
69 69
 
70 70
     public function getRootDir()
@@ -79,25 +79,25 @@  discard block
 block discarded – undo
79 79
     public function loadConfiguration()
80 80
     {
81 81
         $app = $this;
82
-        if (file_exists($this->getConfigurationDir().'/container.'.$this->getEnvironment().'.php')) {
83
-            require $this->getConfigurationDir().'/container.'.$this->getEnvironment().'.php';
82
+        if (file_exists($this->getConfigurationDir() . '/container.' . $this->getEnvironment() . '.php')) {
83
+            require $this->getConfigurationDir() . '/container.' . $this->getEnvironment() . '.php';
84 84
         } else {
85
-            require $this->getConfigurationDir().'/container.php';
85
+            require $this->getConfigurationDir() . '/container.php';
86 86
         }
87 87
     }
88 88
 
89 89
     public function loadRoutes()
90 90
     {
91 91
         $app = $this;
92
-        require $this->getConfigurationDir().'/routes.php';
92
+        require $this->getConfigurationDir() . '/routes.php';
93 93
     }
94 94
 
95 95
     public function registerControllers()
96 96
     {
97
-        if (file_exists($this->getConfigurationDir().'/controllers.php')) {
98
-            $controllers = require $this->getConfigurationDir().'/controllers.php';
97
+        if (file_exists($this->getConfigurationDir() . '/controllers.php')) {
98
+            $controllers = require $this->getConfigurationDir() . '/controllers.php';
99 99
             foreach ($controllers as $key => $class) {
100
-                $this[$key] = function ($app) use ($class) {
100
+                $this[$key] = function($app) use ($class) {
101 101
                     return new $class($app);
102 102
                 };
103 103
             }
@@ -107,12 +107,12 @@  discard block
 block discarded – undo
107 107
     public function registerHandlers()
108 108
     {
109 109
         $app = $this;
110
-        require $this->getConfigurationDir().'/handlers.php';
110
+        require $this->getConfigurationDir() . '/handlers.php';
111 111
     }
112 112
 
113 113
     public function registerProviders()
114 114
     {
115
-        $providers = require $this->getConfigurationDir().'/providers.php';
115
+        $providers = require $this->getConfigurationDir() . '/providers.php';
116 116
         foreach ($providers as $class => $environments) {
117 117
             if (isset($environments['all']) || isset($environments[$this->environment])) {
118 118
                 $this->register(new $class());
Please login to merge, or discard this patch.
config/container.dev.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-require $app->getConfigurationDir().'/container.php';
3
+require $app->getConfigurationDir() . '/container.php';
4 4
 
5
-$app['profiler.cache_dir'] = $app->getCacheDir().'/profiler';
5
+$app['profiler.cache_dir'] = $app->getCacheDir() . '/profiler';
Please login to merge, or discard this patch.
config/container.test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-require $app->getConfigurationDir().'/container.dev.php';
3
+require $app->getConfigurationDir() . '/container.dev.php';
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;
Please login to merge, or discard this patch.
config/container.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 use App\Entity\User;
4 4
 
5
-require $app->getConfigurationDir().'/security.php';
5
+require $app->getConfigurationDir() . '/security.php';
6 6
 
7 7
 $app['assets.version'] = 'v1';
8 8
 
@@ -14,16 +14,16 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 ];
Please login to merge, or discard this patch.