Completed
Push — master ( 2b958c...2d4d7c )
by Klaus
17:50
created
src/Provider/SessionServiceProvider.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Linio\Tortilla\Provider;
5 5
 
@@ -16,26 +16,26 @@  discard block
 block discarded – undo
16 16
 {
17 17
     public function register(Container $app)
18 18
     {
19
-        $app['session'] = function ($app) {
19
+        $app['session'] = function($app) {
20 20
             return new Session($app['session.storage']);
21 21
         };
22 22
 
23
-        $app['session.storage'] = function ($app) {
23
+        $app['session.storage'] = function($app) {
24 24
             return $app['session.storage.native'];
25 25
         };
26 26
 
27
-        $app['session.storage.handler'] = function ($app) {
27
+        $app['session.storage.handler'] = function($app) {
28 28
             return new NativeFileSessionHandler($app['session.storage.save_path']);
29 29
         };
30 30
 
31
-        $app['session.storage.native'] = function ($app) {
31
+        $app['session.storage.native'] = function($app) {
32 32
             return new NativeSessionStorage(
33 33
                 $app['session.storage.options'],
34 34
                 $app['session.storage.handler']
35 35
             );
36 36
         };
37 37
 
38
-        $app['session.listener'] = function ($app) {
38
+        $app['session.listener'] = function($app) {
39 39
             $listener = new SessionListener();
40 40
             $listener->setSession($app['session']);
41 41
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         $app['session.storage.options'] = [];
46 46
         $app['session.storage.save_path'] = null;
47 47
 
48
-        $app->extend('event.dispatcher', function (EventDispatcher $eventDispatcher, $app) {
48
+        $app->extend('event.dispatcher', function(EventDispatcher $eventDispatcher, $app) {
49 49
             $eventDispatcher->addListener(ApplicationEvents::REQUEST, [$app['session.listener'], 'onRequest']);
50 50
             $eventDispatcher->addListener(ApplicationEvents::RESPONSE, [$app['session.listener'], 'onResponse']);
51 51
 
Please login to merge, or discard this patch.
src/Route/ControllerResolver/ServiceControllerResolver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Linio\Tortilla\Route\ControllerResolver;
5 5
 
@@ -24,13 +24,13 @@  discard block
 block discarded – undo
24 24
         }
25 25
 
26 26
         if (strpos($input, ':') === false) {
27
-            throw new \InvalidArgumentException('Unable to resolve provided controller: ' . $input);
27
+            throw new \InvalidArgumentException('Unable to resolve provided controller: '.$input);
28 28
         }
29 29
 
30 30
         list($controllerService, $method) = explode(':', $input);
31 31
 
32 32
         if (!isset($this->container[$controllerService])) {
33
-            throw new \InvalidArgumentException('Unable to resolve provided controller service: ' . $controllerService);
33
+            throw new \InvalidArgumentException('Unable to resolve provided controller service: '.$controllerService);
34 34
         }
35 35
 
36 36
         return [$this->container[$controllerService], $method];
Please login to merge, or discard this patch.
src/Route/Dispatcher.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Linio\Tortilla\Route;
5 5
 
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
 
28 28
         switch ($result[0]) {
29 29
             case self::NOT_FOUND:
30
-                throw new NotFoundHttpException('Route not found: ' . $request->getPathInfo());
30
+                throw new NotFoundHttpException('Route not found: '.$request->getPathInfo());
31 31
 
32 32
             case self::METHOD_NOT_ALLOWED:
33
-                throw new MethodNotAllowedHttpException('Method not allowed: ' . $request->getMethod());
33
+                throw new MethodNotAllowedHttpException('Method not allowed: '.$request->getMethod());
34 34
 
35 35
             case self::FOUND:
36 36
                 $controller = $this->controllerResolver->getController($result[1]);
Please login to merge, or discard this patch.
src/Application.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Linio\Tortilla;
5 5
 
@@ -34,40 +34,40 @@  discard block
 block discarded – undo
34 34
         $this['debug'] = false;
35 35
         $this['config'] = [];
36 36
 
37
-        $this['event.dispatcher'] = function () {
37
+        $this['event.dispatcher'] = function() {
38 38
             return new EventDispatcher();
39 39
         };
40 40
 
41
-        $this['application.json_body_listener'] = function () {
41
+        $this['application.json_body_listener'] = function() {
42 42
             return new JsonBodyListener();
43 43
         };
44 44
 
45
-        $this['controller.resolver'] = function () {
45
+        $this['controller.resolver'] = function() {
46 46
             return new ServiceControllerResolver($this);
47 47
         };
48 48
 
49
-        $this['route.dispatcher'] = function () {
49
+        $this['route.dispatcher'] = function() {
50 50
             $dispatcher = new Dispatcher($this->getRouteCache());
51 51
             $dispatcher->setControllerResolver($this['controller.resolver']);
52 52
 
53 53
             return $dispatcher;
54 54
         };
55 55
 
56
-        $this['route.parser'] = function () {
56
+        $this['route.parser'] = function() {
57 57
             return new RouteParser();
58 58
         };
59 59
 
60
-        $this['route.data_generator'] = function () {
60
+        $this['route.data_generator'] = function() {
61 61
             return new DataGenerator();
62 62
         };
63 63
 
64
-        $this['route.collector'] = function () {
64
+        $this['route.collector'] = function() {
65 65
             return new RouteCollector($this['route.parser'], $this['route.data_generator']);
66 66
         };
67 67
 
68 68
         parent::__construct($values);
69 69
 
70
-        $this->extend('event.dispatcher', function (EventDispatcher $eventDispatcher) {
70
+        $this->extend('event.dispatcher', function(EventDispatcher $eventDispatcher) {
71 71
             $eventDispatcher->addListener(ApplicationEvents::REQUEST, [$this['application.json_body_listener'], 'onRequest']);
72 72
 
73 73
             return $eventDispatcher;
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         $routeData = $this['route.collector']->getData();
86 86
 
87 87
         if (!$this['debug'] && $routeCache) {
88
-            file_put_contents($routeCache, '<?php return ' . var_export($routeData, true) . ';');
88
+            file_put_contents($routeCache, '<?php return '.var_export($routeData, true).';');
89 89
         }
90 90
 
91 91
         return $routeData;
Please login to merge, or discard this patch.