Passed
Push — master ( 419bf8...59abe2 )
by Xavier
02:35
created
public/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 use Symfony\Component\Dotenv\Dotenv;
6 6
 use Symfony\Component\HttpFoundation\Request;
7 7
 
8
-require __DIR__.'/../vendor/autoload.php';
8
+require __DIR__ . '/../vendor/autoload.php';
9 9
 
10 10
 session_start();
11 11
 
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     if (!class_exists(Dotenv::class)) {
15 15
         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.');
16 16
     }
17
-    (new Dotenv())->load(__DIR__.'/../.env');
17
+    (new Dotenv())->load(__DIR__ . '/../.env');
18 18
 }
19 19
 
20 20
 if ($_SERVER['APP_DEBUG'] ?? ('prod' !== ($_SERVER['APP_ENV'] ?? 'dev'))) {
Please login to merge, or discard this patch.
src/Kernel.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -16,17 +16,17 @@  discard block
 block discarded – undo
16 16
 
17 17
     public function getCacheDir()
18 18
     {
19
-        return $this->getProjectDir().'/var/cache/'.$this->environment;
19
+        return $this->getProjectDir() . '/var/cache/' . $this->environment;
20 20
     }
21 21
 
22 22
     public function getLogDir()
23 23
     {
24
-        return $this->getProjectDir().'/var/log';
24
+        return $this->getProjectDir() . '/var/log';
25 25
     }
26 26
 
27 27
     public function registerBundles()
28 28
     {
29
-        $contents = require $this->getProjectDir().'/config/bundles.php';
29
+        $contents = require $this->getProjectDir() . '/config/bundles.php';
30 30
         foreach ($contents as $class => $envs) {
31 31
             if (isset($envs['all']) || isset($envs[$this->environment])) {
32 32
                 yield new $class();
@@ -38,24 +38,24 @@  discard block
 block discarded – undo
38 38
     {
39 39
         $container->setParameter('container.autowiring.strict_mode', true);
40 40
         $container->setParameter('container.dumper.inline_class_loader', true);
41
-        $confDir = $this->getProjectDir().'/config';
42
-        $loader->load($confDir.'/packages/*'.self::CONFIG_EXTS, 'glob');
43
-        if (is_dir($confDir.'/packages/'.$this->environment)) {
44
-            $loader->load($confDir.'/packages/'.$this->environment.'/**/*'.self::CONFIG_EXTS, 'glob');
41
+        $confDir = $this->getProjectDir() . '/config';
42
+        $loader->load($confDir . '/packages/*' . self::CONFIG_EXTS, 'glob');
43
+        if (is_dir($confDir . '/packages/' . $this->environment)) {
44
+            $loader->load($confDir . '/packages/' . $this->environment . '/**/*' . self::CONFIG_EXTS, 'glob');
45 45
         }
46
-        $loader->load($confDir.'/services'.self::CONFIG_EXTS, 'glob');
47
-        $loader->load($confDir.'/services_'.$this->environment.self::CONFIG_EXTS, 'glob');
46
+        $loader->load($confDir . '/services' . self::CONFIG_EXTS, 'glob');
47
+        $loader->load($confDir . '/services_' . $this->environment . self::CONFIG_EXTS, 'glob');
48 48
     }
49 49
 
50 50
     protected function configureRoutes(RouteCollectionBuilder $routes)
51 51
     {
52
-        $confDir = $this->getProjectDir().'/config';
53
-        if (is_dir($confDir.'/routes/')) {
54
-            $routes->import($confDir.'/routes/*'.self::CONFIG_EXTS, '/', 'glob');
52
+        $confDir = $this->getProjectDir() . '/config';
53
+        if (is_dir($confDir . '/routes/')) {
54
+            $routes->import($confDir . '/routes/*' . self::CONFIG_EXTS, '/', 'glob');
55 55
         }
56
-        if (is_dir($confDir.'/routes/'.$this->environment)) {
57
-            $routes->import($confDir.'/routes/'.$this->environment.'/**/*'.self::CONFIG_EXTS, '/', 'glob');
56
+        if (is_dir($confDir . '/routes/' . $this->environment)) {
57
+            $routes->import($confDir . '/routes/' . $this->environment . '/**/*' . self::CONFIG_EXTS, '/', 'glob');
58 58
         }
59
-        $routes->import($confDir.'/routes'.self::CONFIG_EXTS, '/', 'glob');
59
+        $routes->import($confDir . '/routes' . self::CONFIG_EXTS, '/', 'glob');
60 60
     }
61 61
 }
Please login to merge, or discard this patch.
src/TwigExtension/TranslatorExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
     {
86 86
        $languages = [];
87 87
        foreach ($this->container->getParameter('dictionaries') as $languageId => $dictionary) {
88
-           $languages += [ $dictionary['self_name'] => $languageId ];
88
+           $languages += [$dictionary['self_name'] => $languageId];
89 89
        }
90 90
         return $languages;
91 91
     }
Please login to merge, or discard this patch.
src/Event/AdminSubscriber.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,6 +43,6 @@
 block discarded – undo
43 43
 
44 44
     public static function getSubscribedEvents()
45 45
     {
46
-        return [ KernelEvents::CONTROLLER => 'onKernelController' ];
46
+        return [KernelEvents::CONTROLLER => 'onKernelController'];
47 47
     }
48 48
 }
49 49
\ No newline at end of file
Please login to merge, or discard this patch.
src/Event/LocaleListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,6 +58,6 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Controller/AdminController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
             $students = $this->ldap($filter, ['displayname', 'uid']);
38 38
             $res = [];
39 39
 
40
-            foreach($students as $student) {
40
+            foreach ($students as $student) {
41 41
                 if ($student['uid'][0] != null)
42
-                    $res += [ $student['uid'][0] => $student['displayname'][0] ];
42
+                    $res += [$student['uid'][0] => $student['displayname'][0]];
43 43
             }
44 44
 
45 45
             return $this->json($res);
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
                 array_push($classes, $enrollment->class);
78 78
         }
79 79
 
80
-        return $this->render('admin/user.twig',[
80
+        return $this->render('admin/user.twig', [
81 81
             'classes' => $classes,
82 82
             'student_name' => $this->ldapFirst("uid=$id")['displayname'][0]
83 83
         ]);
Please login to merge, or discard this patch.
src/Controller/AbstractController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@
 block discarded – undo
32 32
      */
33 33
     protected function createJWT()
34 34
     {
35
-        return json_decode( $this->http->request('POST', 'auth/login', [
36
-            'headers' => [ 'X-Requested-With' => 'XMLHttpRequest' ],
35
+        return json_decode($this->http->request('POST', 'auth/login', [
36
+            'headers' => ['X-Requested-With' => 'XMLHttpRequest'],
37 37
             'json' => [
38 38
                 'username' => env('API_USERNAME'),
39 39
                 'password' => env('API_PASSWORD')
Please login to merge, or discard this patch.