Completed
Branch master (48abc9)
by Igor
04:34 queued 02:05
created
src/Bundle/Common/File/File.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     }
63 63
 
64 64
     /**
65
-     * @return string|null
65
+     * @return string
66 66
      */
67 67
     public function guessMimeType()
68 68
     {
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
     }
71 71
 
72 72
     /**
73
-     * @param $directory
74
-     * @param null $name
73
+     * @param string $directory
74
+     * @param string|null $name
75 75
      *
76 76
      * @return File
77 77
      *
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @license MIT
4
- * @author Igor Sorokin <[email protected]>
5
- */
3
+     * @license MIT
4
+     * @author Igor Sorokin <[email protected]>
5
+     */
6 6
 namespace Dspbee\Core;
7 7
 
8 8
 use Dspbee\Bundle\Template\Native;
Please login to merge, or discard this patch.
src/Bundle/Common/File/FileUpload.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      * It is extracted from the request from which the file has been uploaded.
37 37
      * Then it should not be considered as a safe value.
38 38
      *
39
-     * @return string|null The original name
39
+     * @return string The original name
40 40
      */
41 41
     public function nameUnsafe()
42 42
     {
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      * The client mime type is extracted from the request from which the file
63 63
      * was uploaded, so it should not be considered as a safe value.
64 64
      *
65
-     * @return string|null The mime type
65
+     * @return string The mime type
66 66
      */
67 67
     public function mimeTypeUnsafe()
68 68
     {
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @license MIT
4
- * @author Igor Sorokin <[email protected]>
5
- */
3
+     * @license MIT
4
+     * @author Igor Sorokin <[email protected]>
5
+     */
6 6
 namespace Dspbee\Core;
7 7
 
8 8
 use Dspbee\Bundle\Template\Native;
Please login to merge, or discard this patch.
src/Core/Request.php 2 patches
Doc Comments   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
     /**
254 254
      * The query (GET) parameters.
255 255
      *
256
-     * @return GetBag|null
256
+     * @return GetBag
257 257
      */
258 258
     public function get(): GetBag
259 259
     {
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
     /**
267 267
      * The query (POST) parameters.
268 268
      *
269
-     * @return PostBag|null
269
+     * @return PostBag
270 270
      */
271 271
     public function post(): PostBag
272 272
     {
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
     /**
280 280
      * The query (COOKIE) parameters.
281 281
      *
282
-     * @return CookieBag|null
282
+     * @return CookieBag
283 283
      */
284 284
     public function cookie(): CookieBag
285 285
     {
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
     /**
293 293
      * The (SERVER) parameters.
294 294
      *
295
-     * @return ServerBag|null
295
+     * @return ServerBag
296 296
      */
297 297
     public function server(): ServerBag
298 298
     {
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
     /**
306 306
      * The (ENV) parameters.
307 307
      *
308
-     * @return EnvBag|null
308
+     * @return EnvBag
309 309
      */
310 310
     public function env(): EnvBag
311 311
     {
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
     /**
319 319
      * Get session handler.
320 320
      *
321
-     * @return Session|null
321
+     * @return Session
322 322
      */
323 323
     public function session(): Session
324 324
     {
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
     /**
332 332
      * The query (FILES) uploaded files.
333 333
      *
334
-     * @return FileBag|null
334
+     * @return FileBag
335 335
      */
336 336
     public function file(): FileBag
337 337
     {
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
     /**
345 345
      * HTTP headers from the $_SERVER variable.
346 346
      *
347
-     * @return HeaderBag|null
347
+     * @return HeaderBag
348 348
      */
349 349
     public function header(): HeaderBag
350 350
     {
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
     /**
358 358
      * Returns the request body content.
359 359
      *
360
-     * @return ValueBag|null
360
+     * @return ValueBag
361 361
      *
362 362
      * @see http://php.net/manual/ru/wrappers.php.php#wrappers.php.input
363 363
      */
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @license MIT
4
- * @author Igor Sorokin <[email protected]>
5
- */
3
+     * @license MIT
4
+     * @author Igor Sorokin <[email protected]>
5
+     */
6 6
 namespace Dspbee\Core;
7 7
 
8 8
 use Dspbee\Bundle\Template\Native;
Please login to merge, or discard this patch.
src/autoload.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
  * Autoload without composer.
4 4
  */
5 5
 $srcRoot = dirname(__FILE__);
6
-spl_autoload_register(function ($path) use ($srcRoot) {
6
+spl_autoload_register(function($path) use ($srcRoot) {
7 7
     $srcRoot = rtrim($srcRoot, '/') . '/';
8 8
     $path = str_replace('Dspbee\\Test\\', '', $path);
9 9
     $path = str_replace('Dspbee\\', '', $path);
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Autoload without composer.
4
- */
3
+     * Autoload without composer.
4
+     */
5 5
 $srcRoot = dirname(__FILE__);
6 6
 spl_autoload_register(function ($path) use ($srcRoot) {
7 7
     $root = rtrim($srcRoot, '/') . '/';
Please login to merge, or discard this patch.
src/Bundle/Debug/Wrap.php 2 patches
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.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @license MIT
4
- * @author Igor Sorokin <[email protected]>
5
- */
3
+     * @license MIT
4
+     * @author Igor Sorokin <[email protected]>
5
+     */
6 6
 namespace Dspbee\Core;
7 7
 
8 8
 use Dspbee\Bundle\Template\Native;
Please login to merge, or discard this patch.
src/Bundle/Template/Native.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@
 block discarded – undo
161 161
             $objects = scandir($dir);
162 162
             foreach ($objects as $object) {
163 163
                 if ('.' != $object && '..' != $object) {
164
-                    if ('dir' == filetype($dir . '/' .$object)) {
164
+                    if ('dir' == filetype($dir . '/' . $object)) {
165 165
                         $this->removeFromDir($dir . '/' . $object, true);
166 166
                     } else {
167 167
                         unlink($dir . '/' . $object);
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @license MIT
4
- * @author Igor Sorokin <[email protected]>
5
- */
3
+     * @license MIT
4
+     * @author Igor Sorokin <[email protected]>
5
+     */
6 6
 namespace Dspbee\Core;
7 7
 
8 8
 use Dspbee\Bundle\Template\Native;
Please login to merge, or discard this patch.
src/Core/Response.php 2 patches
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -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
             }
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @license MIT
4
- * @author Igor Sorokin <[email protected]>
5
- */
3
+     * @license MIT
4
+     * @author Igor Sorokin <[email protected]>
5
+     */
6 6
 namespace Dspbee\Core;
7 7
 
8 8
 use Dspbee\Bundle\Template\Native;
Please login to merge, or discard this patch.
src/Core/Application.php 3 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,10 +32,10 @@  discard block
 block discarded – undo
32 32
         /**
33 33
          * Register autoload to app/$package/src dir's.
34 34
          */
35
-        spl_autoload_register(function ($path) use ($packageRoot) {
35
+        spl_autoload_register(function($path) use ($packageRoot) {
36 36
             $packageRoot = rtrim($packageRoot, '/') . '/';
37 37
             $path = explode('\\', $path);
38
-            array_shift($path);                 // Vendor
38
+            array_shift($path); // Vendor
39 39
             $packageRoot .= array_shift($path); // Package
40 40
             $path = $packageRoot . '/src/' . implode('/', $path) . '.php';
41 41
             if (file_exists($path)) {
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
             /**
56 56
              * Path to router class.
57 57
              */
58
-            $path = $packageRoot . $request->packageRoute()  . '.php';
58
+            $path = $packageRoot . $request->packageRoute() . '.php';
59 59
             if (file_exists($path)) {
60 60
                 require $path;
61 61
                 /**
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             } else {
73 73
                 throw new \RuntimeException(sprintf('The file "%s" does not exist', $path));
74 74
             }
75
-        }  else {
75
+        } else {
76 76
             $route = new BaseRoute();
77 77
             $route->default($packageRoot, $request);
78 78
             if (null !== $route->getResponse()) {
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
             } else {
73 73
                 throw new \RuntimeException(sprintf('The file "%s" does not exist', $path));
74 74
             }
75
-        }  else {
75
+        } else {
76 76
             $route = new BaseRoute();
77 77
             $route->default($packageRoot, $request);
78 78
             if (null !== $route->getResponse()) {
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @license MIT
4
- * @author Igor Sorokin <[email protected]>
5
- */
3
+     * @license MIT
4
+     * @author Igor Sorokin <[email protected]>
5
+     */
6 6
 namespace Dspbee\Core;
7 7
 
8 8
 use Dspbee\Bundle\Template\Native;
Please login to merge, or discard this patch.
src/Bundle/Common/Session/SessionBag.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @license MIT
4
- * @author Igor Sorokin <[email protected]>
5
- */
3
+     * @license MIT
4
+     * @author Igor Sorokin <[email protected]>
5
+     */
6 6
 namespace Dspbee\Core;
7 7
 
8 8
 use Dspbee\Bundle\Template\Native;
Please login to merge, or discard this patch.