Passed
Push — master ( af5fb4...20adb5 )
by Yohann
02:01
created
src/Core/Router.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,8 +51,9 @@  discard block
 block discarded – undo
51 51
     {
52 52
         $uri = $_SERVER['REQUEST_URI'];
53 53
 
54
-        if ($uri === '/')
55
-            return $this::_index;
54
+        if ($uri === '/') {
55
+                    return $this::_index;
56
+        }
56 57
 
57 58
         $uri = substr($uri, 1);
58 59
 
@@ -65,8 +66,9 @@  discard block
 block discarded – undo
65 66
             $this->redirect(SITE . substr($uri, strlen($this::_global)));
66 67
         }
67 68
 
68
-        if ($uri[-1] !== '/')
69
-            return $uri;
69
+        if ($uri[-1] !== '/') {
70
+                    return $uri;
71
+        }
70 72
 
71 73
         $new_uri = substr($uri, 0, -1);
72 74
         $this->redirect(SITE . '/' . $new_uri);
Please login to merge, or discard this patch.
src/Core/Singleton.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,9 @@
 block discarded – undo
9 9
     {
10 10
         $class = get_called_class();
11 11
 
12
-        if (!isset(self::$_instances[$class]))
13
-            self::$_instances[$class] = new $class();
12
+        if (!isset(self::$_instances[$class])) {
13
+                    self::$_instances[$class] = new $class();
14
+        }
14 15
 
15 16
         return self::$_instances[$class];
16 17
     }
Please login to merge, or discard this patch.
src/Public/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 $port = ($_SERVER['SERVER_PORT'] ?? false) === 443;
6 6
 $https = ($_SERVER['HTTPS'] ?? false) === 'on';
7 7
 
8
-define('SITE', (($proto or $port or $https) ? 'https': 'http') . '://' . $_SERVER['SERVER_NAME']);
8
+define('SITE', (($proto or $port or $https) ? 'https' : 'http') . '://' . $_SERVER['SERVER_NAME']);
9 9
 
10 10
 session_start();
11 11
 
Please login to merge, or discard this patch.
src/Controllers/Controller.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@
 block discarded – undo
24 24
     // function by Rakesh Sankar
25 25
 
26 26
     $search = array(
27
-        '/\>[^\S ]+/s',     // strip whitespaces after tags, except space
28
-        '/[^\S ]+\</s',     // strip whitespaces before tags, except space
29
-        '/(\s)+/s',         // shorten multiple whitespace sequences
27
+        '/\>[^\S ]+/s', // strip whitespaces after tags, except space
28
+        '/[^\S ]+\</s', // strip whitespaces before tags, except space
29
+        '/(\s)+/s', // shorten multiple whitespace sequences
30 30
         '/<!--(.|\s)*?-->/' // Remove HTML comments
31 31
     );
32 32
 
Please login to merge, or discard this patch.