Passed
Branch master (2505c8)
by Dawid
02:55
created
Category
src/Http/Middleware/ErrorMiddleware.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
     private function setErrorHandler(): void
67 67
     {
68
-        set_error_handler(function (int $number, string $message, string $file, int $line) {
68
+        set_error_handler(function(int $number, string $message, string $file, int $line) {
69 69
 
70 70
             if (!(error_reporting() & $number)) {
71 71
                 return;
Please login to merge, or discard this patch.
src/Http/Server.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
             $settings = new HttpConfiguration();
49 49
         }
50 50
 
51
-        $this->settings= $settings;
51
+        $this->settings = $settings;
52 52
     }
53 53
 
54 54
     /**
Please login to merge, or discard this patch.
src/Http/ServerRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
      */
160 160
     public function getAttribute($attribute, $default = null)
161 161
     {
162
-        if (! isset($this->attributes[$attribute])) {
162
+        if (!isset($this->attributes[$attribute])) {
163 163
             return $default;
164 164
         }
165 165
 
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
                 continue;
220 220
             }
221 221
 
222
-            if (! $file instanceof UploadedFileInterface) {
222
+            if (!$file instanceof UploadedFileInterface) {
223 223
                 throw new \InvalidArgumentException('Invalid leaf in uploaded files structure');
224 224
             }
225 225
         }
Please login to merge, or discard this patch.
src/Http/Response.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -255,7 +255,7 @@
 block discarded – undo
255 255
      */
256 256
     public static function fromJson($data, int $status = self::HTTP_OK, array $headers = [])
257 257
     {
258
-        if (! $data instanceof \JsonSerializable && ! is_array($data)) {
258
+        if (!$data instanceof \JsonSerializable && !is_array($data)) {
259 259
             throw new InvalidArgumentException('Invalid $data provided, method expects array or instance of \JsonSerializable.');
260 260
         }
261 261
 
Please login to merge, or discard this patch.
examples/Modules/SimpleModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function provideControllers(ControllerAggregate $controllers): void
19 19
     {
20
-        $controllers->add(function ($request) {
20
+        $controllers->add(function($request) {
21 21
             return Response::fromText("Hello {$request->getAttribute('name')}!");
22 22
         }, Route::get('/hello/{name}'));
23 23
 
Please login to merge, or discard this patch.
examples/build_in_server_daemonized_example.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require_once __DIR__.'/../vendor/autoload.php';
2
+require_once __DIR__ . '/../vendor/autoload.php';
3 3
 
4 4
 /**
5 5
  * This example shows how to configure server as a daemon.
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
 // Setup application and routes
24 24
 $application = new Application();
25
-$application->get('/hello/{name}', function (ServerRequestInterface $request) : ResponseInterface {
25
+$application->get('/hello/{name}', function(ServerRequestInterface $request) : ResponseInterface {
26 26
     return Response::fromText("Hello {$request->getAttribute('name')}");
27 27
 });
28 28
 
Please login to merge, or discard this patch.
examples/build_in_server_example.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require_once __DIR__.'/../vendor/autoload.php';
2
+require_once __DIR__ . '/../vendor/autoload.php';
3 3
 
4 4
 use Igni\Http\Application;
5 5
 use Igni\Http\Response;
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 // Setup application and routes
14 14
 $application = new Application();
15
-$application->get('/hello/{name}', function (ServerRequestInterface $request) : ResponseInterface {
15
+$application->get('/hello/{name}', function(ServerRequestInterface $request) : ResponseInterface {
16 16
     return Response::fromText("Hello {$request->getAttribute('name')}");
17 17
 });
18 18
 
Please login to merge, or discard this patch.
examples/modular_application_example.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-require_once __DIR__.'/../vendor/autoload.php';
2
+require_once __DIR__ . '/../vendor/autoload.php';
3 3
 
4 4
 use Igni\Http\Application;
5 5
 use Igni\Http\Server;
Please login to merge, or discard this patch.