@@ -49,11 +49,11 @@ discard block |
||
49 | 49 | |
50 | 50 | protected function mountServices(Jarvis $app) |
51 | 51 | { |
52 | - $app['app'] = function () use ($app): Jarvis { |
|
52 | + $app['app'] = function() use ($app): Jarvis { |
|
53 | 53 | return $app; |
54 | 54 | }; |
55 | 55 | |
56 | - $app['request'] = function (Jarvis $app): Request { |
|
56 | + $app['request'] = function(Jarvis $app): Request { |
|
57 | 57 | $request = Request::createFromGlobals(); |
58 | 58 | |
59 | 59 | $session = $request->getSession(); |
@@ -69,15 +69,15 @@ discard block |
||
69 | 69 | return $request; |
70 | 70 | }; |
71 | 71 | |
72 | - $app['session'] = function (Jarvis $app): Session { |
|
72 | + $app['session'] = function(Jarvis $app): Session { |
|
73 | 73 | return $app['request']->getSession(); |
74 | 74 | }; |
75 | 75 | |
76 | - $app['router'] = function (): Router { |
|
76 | + $app['router'] = function(): Router { |
|
77 | 77 | return new Router(); |
78 | 78 | }; |
79 | 79 | |
80 | - $app['callbackResolver'] = function (Jarvis $app): CallbackResolver { |
|
80 | + $app['callbackResolver'] = function(Jarvis $app): CallbackResolver { |
|
81 | 81 | return new CallbackResolver($app); |
82 | 82 | }; |
83 | 83 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | |
87 | 87 | protected function mountEventReceivers(Jarvis $app) |
88 | 88 | { |
89 | - $app->on(BroadcasterInterface::EXCEPTION_EVENT, function (ExceptionEvent $event) use ($app): void { |
|
89 | + $app->on(BroadcasterInterface::EXCEPTION_EVENT, function(ExceptionEvent $event) use ($app): void { |
|
90 | 90 | $throwable = $event->exception(); |
91 | 91 | $msg = sprintf( |
92 | 92 | '[%s] error in %s at line %s with message: %s', |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | $event->setResponse(new Response($msg, Response::HTTP_INTERNAL_SERVER_ERROR)); |
105 | 105 | }, BroadcasterInterface::RECEIVER_LOW_PRIORITY); |
106 | 106 | |
107 | - $app->on(BroadcasterInterface::CONTROLLER_EVENT, function (ControllerEvent $event) use ($app): void { |
|
107 | + $app->on(BroadcasterInterface::CONTROLLER_EVENT, function(ControllerEvent $event) use ($app): void { |
|
108 | 108 | $finalArgs = []; |
109 | 109 | $rawArgs = $event->arguments(); |
110 | 110 | $refMethod = new \ReflectionMethod($event->callback(), '__invoke'); |