@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace Acelaya\ExpressiveErrorHandler\Log; |
5 | 5 | |
@@ -23,6 +23,6 @@ discard block |
||
23 | 23 | return $base; |
24 | 24 | } |
25 | 25 | |
26 | - return $base . ': ' . PHP_EOL . $err; |
|
26 | + return $base.': '.PHP_EOL.$err; |
|
27 | 27 | } |
28 | 28 | } |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace Acelaya\ExpressiveErrorHandler\Log; |
5 | 5 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace Acelaya\ExpressiveErrorHandler\Exception; |
5 | 5 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace Acelaya\ExpressiveErrorHandler\Exception; |
5 | 5 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace Acelaya\ExpressiveErrorHandler; |
5 | 5 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace Acelaya\ExpressiveErrorHandler\ErrorHandler; |
5 | 5 |
@@ -1,5 +1,5 @@ discard block |
||
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 |
||
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 |
@@ -1,5 +1,5 @@ discard block |
||
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 |
||
27 | 27 | */ |
28 | 28 | public function __invoke(ContainerInterface $container) |
29 | 29 | { |
30 | - $config = $container->has('config') ? $container->get('config') : []; |
|
31 | - $ehConfig = isset($config['error_handler']) ? $config['error_handler'] : []; |
|
30 | + $config = $container->has('config') ? $container->get('config') : [ ]; |
|
31 | + $ehConfig = isset($config[ 'error_handler' ]) ? $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 |
||
38 | 38 | $errorHandlerManager, |
39 | 39 | $logger, |
40 | 40 | $logMessageBuilder, |
41 | - isset($ehConfig['default_content_type']) ? $ehConfig['default_content_type'] : 'text/html' |
|
41 | + isset($ehConfig[ 'default_content_type' ]) ? $ehConfig[ 'default_content_type' ] : 'text/html' |
|
42 | 42 | ); |
43 | 43 | } |
44 | 44 | } |
@@ -1,5 +1,5 @@ discard block |
||
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,9 +23,9 @@ discard block |
||
23 | 23 | */ |
24 | 24 | public function __invoke(ContainerInterface $container) |
25 | 25 | { |
26 | - $config = $container->has('config') ? $container->get('config') : []; |
|
27 | - $errorHandlerConfig = isset($config['error_handler']) ? $config['error_handler'] : []; |
|
28 | - $plugins = isset($errorHandlerConfig['plugins']) ? $errorHandlerConfig['plugins'] : []; |
|
26 | + $config = $container->has('config') ? $container->get('config') : [ ]; |
|
27 | + $errorHandlerConfig = isset($config[ 'error_handler' ]) ? $config[ 'error_handler' ] : [ ]; |
|
28 | + $plugins = isset($errorHandlerConfig[ 'plugins' ]) ? $errorHandlerConfig[ 'plugins' ] : [ ]; |
|
29 | 29 | return new ErrorResponseGeneratorManager($container, $plugins); |
30 | 30 | } |
31 | 31 | } |