Completed
Pull Request — master (#13)
by Alejandro
04:35
created
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/Factory/PlainTextResponseGeneratorFactoryTest.php 1 patch
Spacing   +6 added lines, -6 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,9 +28,9 @@  discard block
 block discarded – undo
28 28
      */
29 29
     public function serviceIsCreated(array $config, bool $expectedIsDev)
30 30
     {
31
-        $instance = $this->factory->__invoke(new ServiceManager(['services' => [
31
+        $instance = $this->factory->__invoke(new ServiceManager([ 'services' => [
32 32
             'config' => $config,
33
-        ]]));
33
+        ] ]));
34 34
 
35 35
         $ref = new \ReflectionObject($instance);
36 36
         $isDev = $ref->getProperty('isDevelopmentMode');
@@ -43,9 +43,9 @@  discard block
 block discarded – undo
43 43
     public function provideDebugs(): array
44 44
     {
45 45
         return [
46
-            [[], false],
47
-            [['debug' => true], true],
48
-            [['debug' => false], false],
46
+            [ [ ], false ],
47
+            [ [ 'debug' => true ], true ],
48
+            [ [ 'debug' => false ], false ],
49 49
         ];
50 50
     }
51 51
 }
Please login to merge, or discard this patch.
src/Log/BasicLogMessageBuilder.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\Log;
5 5
 
Please login to merge, or discard this patch.
src/ErrorHandler/Factory/ContentBasedErrorResponseGeneratorFactory.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 Acelaya\ExpressiveErrorHandler\ErrorHandler\Factory;
5 5
 
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
      */
28 28
     public function __invoke(ContainerInterface $container)
29 29
     {
30
-        $config = $container->has('config') ? $container->get('config') : [];
31
-        $ehConfig = $config['error_handler'] ?? [];
30
+        $config = $container->has('config') ? $container->get('config') : [ ];
31
+        $ehConfig = $config[ 'error_handler' ] ?? [ ];
32 32
 
33 33
         $errorHandlerManager = $container->get(ErrorResponseGeneratorManager::class);
34 34
         $logger = $container->has(LoggerInterface::class) ? $container->get(LoggerInterface::class) : new NullLogger();
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             $errorHandlerManager,
39 39
             $logger,
40 40
             $logMessageBuilder,
41
-            $ehConfig['default_content_type'] ?? 'text/html'
41
+            $ehConfig[ 'default_content_type' ] ?? 'text/html'
42 42
         );
43 43
     }
44 44
 }
Please login to merge, or discard this patch.
src/ErrorHandler/Factory/ErrorHandlerManagerFactory.php 1 patch
Spacing   +3 added lines, -3 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 Acelaya\ExpressiveErrorHandler\ErrorHandler\Factory;
5 5
 
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
      */
24 24
     public function __invoke(ContainerInterface $container)
25 25
     {
26
-        $config = $container->has('config') ? $container->get('config') : [];
27
-        $plugins = $config['error_handler']['plugins'] ?? [];
26
+        $config = $container->has('config') ? $container->get('config') : [ ];
27
+        $plugins = $config[ 'error_handler' ][ 'plugins' ] ?? [ ];
28 28
         return new ErrorResponseGeneratorManager($container, $plugins);
29 29
     }
30 30
 }
Please login to merge, or discard this patch.
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.
src/ErrorHandler/ContentBasedErrorResponseGenerator.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 Acelaya\ExpressiveErrorHandler\ErrorHandler;
5 5
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         /** @var array $accepts */
81 81
         $accepts = \explode(',', $accepts);
82 82
         foreach ($accepts as $accept) {
83
-            if (! $this->errorHandlerManager->has($accept)) {
83
+            if (!$this->errorHandlerManager->has($accept)) {
84 84
                 continue;
85 85
             }
86 86
 
Please login to merge, or discard this patch.
src/Exception/InvalidArgumentException.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\Exception;
5 5
 
Please login to merge, or discard this patch.