@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Chubbyphp\ErrorHandler; |
6 | 6 | |
@@ -14,11 +14,11 @@ discard block |
||
14 | 14 | */ |
15 | 15 | public function register(Container $container) |
16 | 16 | { |
17 | - $container['errorHandler.defaultProvider'] = function () use ($container) { |
|
17 | + $container['errorHandler.defaultProvider'] = function() use ($container) { |
|
18 | 18 | throw new \RuntimeException('Please configure your default provider for error handler!'); |
19 | 19 | }; |
20 | 20 | |
21 | - $container['errorHandler.service'] = function () use ($container) { |
|
21 | + $container['errorHandler.service'] = function() use ($container) { |
|
22 | 22 | return new SimpleErrorHandler($container['errorHandler.defaultProvider'], $container['logger'] ?? null); |
23 | 23 | }; |
24 | 24 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Chubbyphp\ErrorHandler; |
6 | 6 | |
@@ -17,15 +17,15 @@ discard block |
||
17 | 17 | { |
18 | 18 | $this->registerRequirements($container); |
19 | 19 | |
20 | - $container['errorHandler.defaultProvider'] = function () use ($container) { |
|
20 | + $container['errorHandler.defaultProvider'] = function() use ($container) { |
|
21 | 21 | throw new \RuntimeException('Please configure your default provider for error handler!'); |
22 | 22 | }; |
23 | 23 | |
24 | - $container['errorHandler.providers'] = function () use ($container) { |
|
24 | + $container['errorHandler.providers'] = function() use ($container) { |
|
25 | 25 | return []; |
26 | 26 | }; |
27 | 27 | |
28 | - $container['errorHandler.service'] = function () use ($container) { |
|
28 | + $container['errorHandler.service'] = function() use ($container) { |
|
29 | 29 | return new AdvancedErrorHandler( |
30 | 30 | $container['errorHandler.contentTypeResolver'], |
31 | 31 | $container['errorHandler.defaultProvider'], |
@@ -40,11 +40,11 @@ discard block |
||
40 | 40 | */ |
41 | 41 | private function registerRequirements(Container $container) |
42 | 42 | { |
43 | - $container['errorHandler.acceptNegation'] = function () use ($container) { |
|
43 | + $container['errorHandler.acceptNegation'] = function() use ($container) { |
|
44 | 44 | return new Negotiator(); |
45 | 45 | }; |
46 | 46 | |
47 | - $container['errorHandler.contentTypeResolver'] = function () use ($container) { |
|
47 | + $container['errorHandler.contentTypeResolver'] = function() use ($container) { |
|
48 | 48 | return new ContentTypeResolver($container['errorHandler.acceptNegation']); |
49 | 49 | }; |
50 | 50 | } |