@@ -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 Linio\Tortilla; |
6 | 6 | |
@@ -36,40 +36,40 @@ discard block |
||
36 | 36 | $this['debug'] = false; |
37 | 37 | $this['config'] = []; |
38 | 38 | |
39 | - $this['event.dispatcher'] = function () { |
|
39 | + $this['event.dispatcher'] = function() { |
|
40 | 40 | return new EventDispatcher(); |
41 | 41 | }; |
42 | 42 | |
43 | - $this['application.json_request_body'] = function () { |
|
43 | + $this['application.json_request_body'] = function() { |
|
44 | 44 | return new JsonRequestBody(); |
45 | 45 | }; |
46 | 46 | |
47 | - $this['controller.resolver'] = function () { |
|
47 | + $this['controller.resolver'] = function() { |
|
48 | 48 | return new ServiceControllerResolver($this); |
49 | 49 | }; |
50 | 50 | |
51 | - $this['route.dispatcher'] = function () { |
|
51 | + $this['route.dispatcher'] = function() { |
|
52 | 52 | $dispatcher = new Dispatcher($this->getRouteCache()); |
53 | 53 | $dispatcher->setControllerResolver($this['controller.resolver']); |
54 | 54 | |
55 | 55 | return $dispatcher; |
56 | 56 | }; |
57 | 57 | |
58 | - $this['route.parser'] = function () { |
|
58 | + $this['route.parser'] = function() { |
|
59 | 59 | return new RouteParser(); |
60 | 60 | }; |
61 | 61 | |
62 | - $this['route.data_generator'] = function () { |
|
62 | + $this['route.data_generator'] = function() { |
|
63 | 63 | return new DataGenerator(); |
64 | 64 | }; |
65 | 65 | |
66 | - $this['route.collector'] = function () { |
|
66 | + $this['route.collector'] = function() { |
|
67 | 67 | return new RouteCollector($this['route.parser'], $this['route.data_generator']); |
68 | 68 | }; |
69 | 69 | |
70 | 70 | parent::__construct($values); |
71 | 71 | |
72 | - $this->extend('event.dispatcher', function (EventDispatcher $eventDispatcher) { |
|
72 | + $this->extend('event.dispatcher', function(EventDispatcher $eventDispatcher) { |
|
73 | 73 | $eventDispatcher->addListener(ApplicationEvents::REQUEST, [$this['application.json_request_body'], 'onRequest']); |
74 | 74 | |
75 | 75 | return $eventDispatcher; |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $routeData = $this['route.collector']->getData(); |
88 | 88 | |
89 | 89 | if (!$this['debug'] && $routeCache) { |
90 | - file_put_contents($routeCache, '<?php return ' . var_export($routeData, true) . ';'); |
|
90 | + file_put_contents($routeCache, '<?php return '.var_export($routeData, true).';'); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | return $routeData; |