@@ -34,25 +34,25 @@ discard block |
||
34 | 34 | */ |
35 | 35 | public function handle(ServerRequestInterface $request, ResponseInterface $response): ResponseInterface |
36 | 36 | { |
37 | - $container = $this->getContainer(); |
|
37 | + $container = $this->getContainer(); |
|
38 | 38 | $container->share(ServerRequestInterface::class, $request); |
39 | 39 | $container->share(ResponseInterface::class, $response); |
40 | 40 | $container->share('emitter', SapiEmitter::class); |
41 | 41 | |
42 | 42 | foreach ($this->serviceProviders as $serviceProvider) |
43 | - { |
|
44 | - $container->addServiceProvider($serviceProvider); |
|
45 | - } |
|
43 | + { |
|
44 | + $container->addServiceProvider($serviceProvider); |
|
45 | + } |
|
46 | 46 | |
47 | - $route = new RouteCollection($container); |
|
47 | + $route = new RouteCollection($container); |
|
48 | 48 | |
49 | - $route->map('GET', '/', function (ServerRequestInterface $request, ResponseInterface $response) { |
|
50 | - $response->getBody()->write('<h1>Hello, World!</h1>'); |
|
49 | + $route->map('GET', '/', function (ServerRequestInterface $request, ResponseInterface $response) { |
|
50 | + $response->getBody()->write('<h1>Hello, World!</h1>'); |
|
51 | 51 | |
52 | - return $response; |
|
53 | - }); |
|
52 | + return $response; |
|
53 | + }); |
|
54 | 54 | |
55 | - return $route->dispatch($request, $response); |
|
55 | + return $route->dispatch($request, $response); |
|
56 | 56 | |
57 | 57 | // $middlewareResolver = new Resolver(); |
58 | 58 | |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $middleware = []; |
81 | 81 | |
82 | 82 | foreach ($this->globalMiddleware as $globalMiddleware) { |
83 | - $middleware[] = $this->getContainer()->get($globalMiddleware); |
|
83 | + $middleware[] = $this->getContainer()->get($globalMiddleware); |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | return $middleware; |