@@ -43,11 +43,11 @@ discard block |
||
43 | 43 | // services declarations |
44 | 44 | // ===================== |
45 | 45 | |
46 | - $app['app'] = function () use ($app): Jarvis { |
|
46 | + $app['app'] = function() use ($app): Jarvis { |
|
47 | 47 | return $app; |
48 | 48 | }; |
49 | 49 | |
50 | - $app['request'] = function (Jarvis $app): Request { |
|
50 | + $app['request'] = function(Jarvis $app): Request { |
|
51 | 51 | $request = Request::createFromGlobals(); |
52 | 52 | |
53 | 53 | $session = $request->getSession(); |
@@ -63,15 +63,15 @@ discard block |
||
63 | 63 | return $request; |
64 | 64 | }; |
65 | 65 | |
66 | - $app['session'] = function (Jarvis $app): Session { |
|
66 | + $app['session'] = function(Jarvis $app): Session { |
|
67 | 67 | return $app['request']->getSession(); |
68 | 68 | }; |
69 | 69 | |
70 | - $app['router'] = function (): Router { |
|
70 | + $app['router'] = function(): Router { |
|
71 | 71 | return new Router(); |
72 | 72 | }; |
73 | 73 | |
74 | - $app['callbackResolver'] = function (Jarvis $app): CallbackResolver { |
|
74 | + $app['callbackResolver'] = function(Jarvis $app): CallbackResolver { |
|
75 | 75 | return new CallbackResolver($app); |
76 | 76 | }; |
77 | 77 | |
@@ -80,12 +80,12 @@ discard block |
||
80 | 80 | // events receivers |
81 | 81 | // ================ |
82 | 82 | |
83 | - $app->on(BroadcasterInterface::EXCEPTION_EVENT, function (ExceptionEvent $event): void { |
|
83 | + $app->on(BroadcasterInterface::EXCEPTION_EVENT, function(ExceptionEvent $event): void { |
|
84 | 84 | $response = new Response($event->exception()->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR); |
85 | 85 | $event->setResponse($response); |
86 | 86 | }, BroadcasterInterface::RECEIVER_LOW_PRIORITY); |
87 | 87 | |
88 | - $app->on(BroadcasterInterface::CONTROLLER_EVENT, function (ControllerEvent $event) use ($app): void { |
|
88 | + $app->on(BroadcasterInterface::CONTROLLER_EVENT, function(ControllerEvent $event) use ($app): void { |
|
89 | 89 | $finalArgs = []; |
90 | 90 | $rawArgs = $event->arguments(); |
91 | 91 | $refMethod = new \ReflectionMethod($event->callback(), '__invoke'); |