Completed
Push — master ( 12413a...8da446 )
by Igor
03:21
created
src/Bundle/Debug/Wrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
     public static function handleFatal()
46 46
     {
47 47
         $error = error_get_last();
48
-        if(null !== $error) {
48
+        if (null !== $error) {
49 49
             self::render($error["type"], $error["message"], $error["file"], $error["line"]);
50 50
         }
51 51
     }
Please login to merge, or discard this patch.
src/autoload.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,11 +3,11 @@
 block discarded – undo
3 3
  * Autoload without composer.
4 4
  */
5 5
 $srcRoot = dirname(__FILE__);
6
-spl_autoload_register(function ($path) use ($srcRoot) {
7
-    $root = rtrim($srcRoot, '/') . '/';
6
+spl_autoload_register(function($path) use ($srcRoot) {
7
+    $root = rtrim($srcRoot, '/').'/';
8 8
     $path = str_replace('Dspbee\\Test\\', '', $path);
9 9
     $path = str_replace('Dspbee\\', '', $path);
10
-    $path = $root . $path . '.php';
10
+    $path = $root.$path.'.php';
11 11
     if (file_exists($path)) {
12 12
         require_once $path;
13 13
     }
Please login to merge, or discard this patch.
src/Bundle/Common/Bag/ServerBag.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
         if (isset($_SERVER[$key])) {
59 59
             return $_SERVER[$key];
60 60
         } else {
61
-            $key = 'HTTP_' . $key;
61
+            $key = 'HTTP_'.$key;
62 62
             return $_SERVER[$key] ?? $default;
63 63
         }
64 64
     }
Please login to merge, or discard this patch.
src/Bundle/Common/Bag/HeaderBag.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
 
79 79
         // PHP_AUTH_USER/PHP_AUTH_PW
80 80
         if (isset($headers['PHP_AUTH_USER'])) {
81
-            $headers['AUTHORIZATION'] = 'Basic ' . base64_encode($headers['PHP_AUTH_USER'] . ':' . $headers['PHP_AUTH_PW']);
81
+            $headers['AUTHORIZATION'] = 'Basic '.base64_encode($headers['PHP_AUTH_USER'].':'.$headers['PHP_AUTH_PW']);
82 82
         } elseif (isset($headers['PHP_AUTH_DIGEST'])) {
83 83
             $headers['AUTHORIZATION'] = $headers['PHP_AUTH_DIGEST'];
84 84
         }
Please login to merge, or discard this patch.
src/Bundle/Common/File/File.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
             throw new FileException(sprintf('Unable to write in the "%s" directory', $directory));
88 88
         }
89 89
 
90
-        $target = rtrim($directory, '/\\') . DIRECTORY_SEPARATOR . (null === $name ? $this->getBasename() : $this->getName($name));
90
+        $target = rtrim($directory, '/\\').DIRECTORY_SEPARATOR.(null === $name ? $this->getBasename() : $this->getName($name));
91 91
 
92 92
         return new self($target, false);
93 93
     }
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
             throw new FileException(sprintf('Could not rename the file "%s" (%s)', $this->getPathname(), strip_tags($error['message'])));
49 49
         }
50 50
 
51
-       $this->customChmod($target);
51
+        $this->customChmod($target);
52 52
 
53 53
         return $target;
54 54
     }
Please login to merge, or discard this patch.
src/Core/DefaultRoute.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,10 +25,10 @@
 block discarded – undo
25 25
     {
26 26
         $packageRoot = rtrim($packageRoot, '/');
27 27
         $route = preg_replace('/\/\d+/u', '/D', $request->route());
28
-        $path = $packageRoot . '/Route/' . $route . '/' . $request->method() . '.php';
28
+        $path = $packageRoot.'/Route/'.$route.'/'.$request->method().'.php';
29 29
         if (file_exists($path)) {
30 30
             require $path;
31
-            $controllerClass = $request->package() . '\\Route_' . str_replace('/', '_', $route) . '\\' . $request->method();
31
+            $controllerClass = $request->package().'\\Route_'.str_replace('/', '_', $route).'\\'.$request->method();
32 32
             /**
33 33
              * @var BaseController $controller
34 34
              */
Please login to merge, or discard this patch.
src/Core/Response.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     public function header($name, $value)
72 72
     {
73 73
         if (!empty($name) && !empty($value) && !headers_sent()) {
74
-            header($name . ': ' . $value);
74
+            header($name.': '.$value);
75 75
             return true;
76 76
         }
77 77
         return false;
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
                 $statusTexts = [
112 112
                     100 => 'Continue',
113 113
                     101 => 'Switching Protocols',
114
-                    102 => 'Processing',            // RFC2518
114
+                    102 => 'Processing', // RFC2518
115 115
                     200 => 'OK',
116 116
                     201 => 'Created',
117 117
                     202 => 'Accepted',
@@ -119,9 +119,9 @@  discard block
 block discarded – undo
119 119
                     204 => 'No Content',
120 120
                     205 => 'Reset Content',
121 121
                     206 => 'Partial Content',
122
-                    207 => 'Multi-Status',          // RFC4918
123
-                    208 => 'Already Reported',      // RFC5842
124
-                    226 => 'IM Used',               // RFC3229
122
+                    207 => 'Multi-Status', // RFC4918
123
+                    208 => 'Already Reported', // RFC5842
124
+                    226 => 'IM Used', // RFC3229
125 125
                     300 => 'Multiple Choices',
126 126
                     301 => 'Moved Permanently',
127 127
                     302 => 'Found',
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
                     304 => 'Not Modified',
130 130
                     305 => 'Use Proxy',
131 131
                     307 => 'Temporary Redirect',
132
-                    308 => 'Permanent Redirect',    // RFC7238
132
+                    308 => 'Permanent Redirect', // RFC7238
133 133
                     400 => 'Bad Request',
134 134
                     401 => 'Unauthorized',
135 135
                     402 => 'Payment Required',
@@ -148,26 +148,26 @@  discard block
 block discarded – undo
148 148
                     415 => 'Unsupported Media Type',
149 149
                     416 => 'Range Not Satisfiable',
150 150
                     417 => 'Expectation Failed',
151
-                    418 => 'I\'m a teapot',                                               // RFC2324
152
-                    422 => 'Unprocessable Entity',                                        // RFC4918
153
-                    423 => 'Locked',                                                      // RFC4918
154
-                    424 => 'Failed Dependency',                                           // RFC4918
155
-                    425 => 'Reserved for WebDAV advanced collections expired proposal',   // RFC2817
156
-                    426 => 'Upgrade Required',                                            // RFC2817
157
-                    428 => 'Precondition Required',                                       // RFC6585
158
-                    429 => 'Too Many Requests',                                           // RFC6585
159
-                    431 => 'Request Header Fields Too Large',                             // RFC6585
151
+                    418 => 'I\'m a teapot', // RFC2324
152
+                    422 => 'Unprocessable Entity', // RFC4918
153
+                    423 => 'Locked', // RFC4918
154
+                    424 => 'Failed Dependency', // RFC4918
155
+                    425 => 'Reserved for WebDAV advanced collections expired proposal', // RFC2817
156
+                    426 => 'Upgrade Required', // RFC2817
157
+                    428 => 'Precondition Required', // RFC6585
158
+                    429 => 'Too Many Requests', // RFC6585
159
+                    431 => 'Request Header Fields Too Large', // RFC6585
160 160
                     500 => 'Internal Server Error',
161 161
                     501 => 'Not Implemented',
162 162
                     502 => 'Bad Gateway',
163 163
                     503 => 'Service Unavailable',
164 164
                     504 => 'Gateway Timeout',
165 165
                     505 => 'HTTP Version Not Supported',
166
-                    506 => 'Variant Also Negotiates (Experimental)',                      // RFC2295
167
-                    507 => 'Insufficient Storage',                                        // RFC4918
168
-                    508 => 'Loop Detected',                                               // RFC5842
169
-                    510 => 'Not Extended',                                                // RFC2774
170
-                    511 => 'Network Authentication Required',                             // RFC6585
166
+                    506 => 'Variant Also Negotiates (Experimental)', // RFC2295
167
+                    507 => 'Insufficient Storage', // RFC4918
168
+                    508 => 'Loop Detected', // RFC5842
169
+                    510 => 'Not Extended', // RFC2774
170
+                    511 => 'Network Authentication Required', // RFC6585
171 171
                 ];
172 172
                 $statusText = $statusTexts[$statusCode];
173 173
             }
@@ -189,13 +189,13 @@  discard block
 block discarded – undo
189 189
     {
190 190
         $server = filter_input_array(INPUT_SERVER);
191 191
         if (null === $url && isset($server['REQUEST_URI'])) {
192
-            $url = '/' . trim($server['REQUEST_URI'], '/');
192
+            $url = '/'.trim($server['REQUEST_URI'], '/');
193 193
             preg_match('/^[\\a-zA-Z0-9-\._~:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=%]*$/iD', $url, $match);
194 194
             $url = $match[1] ?? '';
195 195
         }
196 196
 
197 197
         if (!headers_sent()) {
198
-            header('Location: ' . $url, true, $statusCode);
198
+            header('Location: '.$url, true, $statusCode);
199 199
         }
200 200
 
201 201
         echo sprintf('<!DOCTYPE html>
Please login to merge, or discard this patch.
src/Bundle/Template/Native.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -34,22 +34,22 @@  discard block
 block discarded – undo
34 34
         $cacheName = $name;
35 35
         if (false === strpos($name, '.')) {
36 36
             if (!empty($name)) {
37
-                $name = '.' . $name;
37
+                $name = '.'.$name;
38 38
             }
39
-            $name = 'view' . $name . '.html.php';
39
+            $name = 'view'.$name.'.html.php';
40 40
             $this->isRouteView = true;
41 41
 
42 42
             $stack = debug_backtrace();
43 43
             foreach ($stack as $item) {
44
-                if (false !== stripos($item['file'], DIRECTORY_SEPARATOR . 'Route' . DIRECTORY_SEPARATOR)) {
45
-                    $cacheName = pathinfo($item['file'], PATHINFO_DIRNAME) . '/' . $name;
46
-                    $cacheName = explode('Route' . DIRECTORY_SEPARATOR, $cacheName)[1];
44
+                if (false !== stripos($item['file'], DIRECTORY_SEPARATOR.'Route'.DIRECTORY_SEPARATOR)) {
45
+                    $cacheName = pathinfo($item['file'], PATHINFO_DIRNAME).'/'.$name;
46
+                    $cacheName = explode('Route'.DIRECTORY_SEPARATOR, $cacheName)[1];
47 47
                     $cacheName = str_replace(['/', '\\'], '_', $cacheName);
48 48
                     break;
49 49
                 }
50 50
             }
51 51
         }
52
-        $path = $this->packageRoot . '/view/_cache/' . str_replace('/', '_', $cacheName);
52
+        $path = $this->packageRoot.'/view/_cache/'.str_replace('/', '_', $cacheName);
53 53
 
54 54
         if (!file_exists($path)) {
55 55
             $code = $this->compile($name, true, true);
@@ -96,13 +96,13 @@  discard block
 block discarded – undo
96 96
             $path = '';
97 97
             $stack = debug_backtrace();
98 98
             foreach ($stack as $item) {
99
-                if (false !== stripos($item['file'], DIRECTORY_SEPARATOR . 'Route' . DIRECTORY_SEPARATOR)) {
100
-                    $path = pathinfo($item['file'], PATHINFO_DIRNAME) . '/' . $name;
99
+                if (false !== stripos($item['file'], DIRECTORY_SEPARATOR.'Route'.DIRECTORY_SEPARATOR)) {
100
+                    $path = pathinfo($item['file'], PATHINFO_DIRNAME).'/'.$name;
101 101
                     break;
102 102
                 }
103 103
             }
104 104
         } else {
105
-            $path = $this->packageRoot . '/view/' . $name;
105
+            $path = $this->packageRoot.'/view/'.$name;
106 106
         }
107 107
 
108 108
         if (file_exists($path)) {
Please login to merge, or discard this patch.
src/Core/Request.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
         /**
66 66
          * Request URL.
67 67
          */
68
-        $this->url = '/' . $url;
68
+        $this->url = '/'.$url;
69 69
 
70 70
         /**
71 71
          * Get method.
Please login to merge, or discard this patch.