Completed
Push — master ( 61ea01...be309f )
by Alejandro
01:30
created
src/ErrorHandler/ErrorResponseGeneratorManager.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
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Acelaya\ExpressiveErrorHandler\ErrorHandler;
5 5
 
Please login to merge, or discard this patch.
test/ConfigProviderTest.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
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace AcelayaTest\ExpressiveErrorHandler;
5 5
 
Please login to merge, or discard this patch.
test/Log/BasicLogMessageBuilderTest.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
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace AcelayaTest\ExpressiveErrorHandler\Log;
5 5
 
@@ -36,6 +36,6 @@  discard block
 block discarded – undo
36 36
     {
37 37
         $err = new \Exception('A super critical error');
38 38
         $message = $this->messageBuilder->buildMessage(ServerRequestFactory::fromGlobals(), new Response(), $err);
39
-        $this->assertEquals('Error occurred while dispatching request: ' . PHP_EOL . $err, $message);
39
+        $this->assertEquals('Error occurred while dispatching request: '.PHP_EOL.$err, $message);
40 40
     }
41 41
 }
Please login to merge, or discard this patch.
test/ErrorHandler/ContentBasedErrorHandlerTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace AcelayaTest\ExpressiveErrorHandler\ErrorHandler;
5 5
 
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
         $this->errorHandler = new ContentBasedErrorResponseGenerator(
25 25
             new ErrorResponseGeneratorManager(new ServiceManager(), [
26 26
                 'factories' => [
27
-                    'text/html' => [$this, 'factory'],
28
-                    'application/json' => [$this, 'factory'],
27
+                    'text/html' => [ $this, 'factory' ],
28
+                    'application/json' => [ $this, 'factory' ],
29 29
                 ],
30 30
             ]),
31 31
             new NullLogger(),
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     public function factory($container, $name)
37 37
     {
38
-        return function () use ($name) {
38
+        return function() use ($name) {
39 39
             return (new Response())->withHeader('Content-type', $name);
40 40
         };
41 41
     }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     public function ifNoErrorHandlerIsFoundAnExceptionIsThrown()
78 78
     {
79 79
         $this->errorHandler = new ContentBasedErrorResponseGenerator(
80
-            new ErrorResponseGeneratorManager(new ServiceManager(), []),
80
+            new ErrorResponseGeneratorManager(new ServiceManager(), [ ]),
81 81
             new NullLogger(),
82 82
             new BasicLogMessageBuilder()
83 83
         );
@@ -93,8 +93,8 @@  discard block
 block discarded – undo
93 93
         $this->errorHandler = new ContentBasedErrorResponseGenerator(
94 94
             new ErrorResponseGeneratorManager(new ServiceManager(), [
95 95
                 'factories' => [
96
-                    'text/html' => [$this, 'factory'],
97
-                    'application/json' => [$this, 'factory'],
96
+                    'text/html' => [ $this, 'factory' ],
97
+                    'application/json' => [ $this, 'factory' ],
98 98
                 ],
99 99
             ]),
100 100
             new NullLogger(),
Please login to merge, or discard this patch.
test/ErrorHandler/ErrorHandlerManagerTest.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
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace AcelayaTest\ExpressiveErrorHandler\ErrorHandler;
5 5
 
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     {
19 19
         $this->pluginManager = new ErrorResponseGeneratorManager(new ServiceManager(), [
20 20
             'services' => [
21
-                'foo' => function () {
21
+                'foo' => function() {
22 22
                 },
23 23
             ],
24 24
             'invokables' => [
Please login to merge, or discard this patch.
test/ErrorHandler/Factory/ContentBasedErrorHandlerFactoryTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace AcelayaTest\ExpressiveErrorHandler\ErrorHandler\Factory;
5 5
 
@@ -28,17 +28,17 @@  discard block
 block discarded – undo
28 28
      */
29 29
     public function serviceIsCreated()
30 30
     {
31
-        $instance = $this->factory->__invoke(new ServiceManager(['services' => [
31
+        $instance = $this->factory->__invoke(new ServiceManager([ 'services' => [
32 32
             ErrorResponseGeneratorManager::class => $this->prophesize(ErrorResponseGeneratorManager::class)->reveal(),
33 33
             LogMessageBuilderInterface::class => $this->prophesize(LogMessageBuilderInterface::class)->reveal(),
34
-        ]]));
34
+        ] ]));
35 35
         $this->assertInstanceOf(ContentBasedErrorResponseGenerator::class, $instance);
36 36
 
37
-        $instance = $this->factory->__invoke(new ServiceManager(['services' => [
37
+        $instance = $this->factory->__invoke(new ServiceManager([ 'services' => [
38 38
             ErrorResponseGeneratorManager::class => $this->prophesize(ErrorResponseGeneratorManager::class)->reveal(),
39 39
             LogMessageBuilderInterface::class => $this->prophesize(LogMessageBuilderInterface::class)->reveal(),
40 40
             LoggerInterface::class => $this->prophesize(LoggerInterface::class)->reveal(),
41
-        ]]));
41
+        ] ]));
42 42
         $this->assertInstanceOf(ContentBasedErrorResponseGenerator::class, $instance);
43 43
     }
44 44
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     public function defaultContentTypeIsSetWhenDefined()
49 49
     {
50 50
         /** @var ContentBasedErrorResponseGenerator $instance */
51
-        $instance = $this->factory->__invoke(new ServiceManager(['services' => [
51
+        $instance = $this->factory->__invoke(new ServiceManager([ 'services' => [
52 52
             ErrorResponseGeneratorManager::class => $this->prophesize(ErrorResponseGeneratorManager::class)->reveal(),
53 53
             LogMessageBuilderInterface::class => $this->prophesize(LogMessageBuilderInterface::class)->reveal(),
54 54
             'config' => [
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
                     'default_content_type' => 'application/json',
57 57
                 ],
58 58
             ],
59
-        ]]));
59
+        ] ]));
60 60
 
61 61
         $ref = new \ReflectionObject($instance);
62 62
         $prop = $ref->getProperty('defaultContentType');
Please login to merge, or discard this patch.
test/ErrorHandler/Factory/ErrorHandlerManagerFactoryTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace AcelayaTest\ExpressiveErrorHandler\ErrorHandler\Factory;
5 5
 
@@ -25,13 +25,13 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public function serviceIsCreated()
27 27
     {
28
-        $instance = $this->factory->__invoke(new ServiceManager(['services' => [
28
+        $instance = $this->factory->__invoke(new ServiceManager([ 'services' => [
29 29
             'config' => [
30 30
                 'error_handler' => [
31
-                    'plugins' => [],
31
+                    'plugins' => [ ],
32 32
                 ],
33 33
             ],
34
-        ]]));
34
+        ] ]));
35 35
         $this->assertInstanceOf(ErrorResponseGeneratorManager::class, $instance);
36 36
     }
37 37
 }
Please login to merge, or discard this patch.