Completed
Push — master ( f6b863...dc6b17 )
by Albert
02:31
created
src/AppKernel.php 1 patch
Spacing   +16 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Nastoletni\Code;
6 6
 
@@ -70,40 +70,38 @@  discard block
 block discarded – undo
70 70
     {
71 71
         $container = $this->slim->getContainer();
72 72
         $container['settings']['displayErrorDetails'] = $container['config']['debug'];
73
-        $container['logger'] = function () {
73
+        $container['logger'] = function() {
74 74
             return new Logger('application', [
75 75
                 new StreamHandler(__DIR__.'/../logs/logs.log'),
76 76
             ]);
77 77
         };
78
-        $container['foundHandler'] = function () {
78
+        $container['foundHandler'] = function() {
79 79
             return new RequestResponseArgs();
80 80
         };
81
-        $container['notFoundHandler'] = function (Container $container) {
81
+        $container['notFoundHandler'] = function(Container $container) {
82 82
             return [$container[ErrorController::class], 'notFound'];
83 83
         };
84
-        $container['errorHandler'] = function (Container $container) {
84
+        $container['errorHandler'] = function(Container $container) {
85 85
             // Show pretty error page on production and Slim debug info on development.
86 86
             $next = $container['config']['debug'] ?
87
-                new Error($container['config']['debug']) :
88
-                [$container[ErrorController::class], 'error'];
87
+                new Error($container['config']['debug']) : [$container[ErrorController::class], 'error'];
89 88
 
90 89
             return new Slim\Handler\LoggingErrorHandler(
91 90
                 $container->get('logger'),
92 91
                 $next
93 92
             );
94 93
         };
95
-        $container['phpErrorHandler'] = function (Container $container) {
94
+        $container['phpErrorHandler'] = function(Container $container) {
96 95
             // Show pretty error page on production and Slim debug info on development.
97 96
             $next = $container['config']['debug'] ?
98
-                new PhpError($container['config']['debug']) :
99
-                [$container[ErrorController::class], 'error'];
97
+                new PhpError($container['config']['debug']) : [$container[ErrorController::class], 'error'];
100 98
 
101 99
             return new Slim\Handler\LoggingErrorHandler(
102 100
                 $container->get('logger'),
103 101
                 $next
104 102
             );
105 103
         };
106
-        $container['translator'] = function (Container $container) {
104
+        $container['translator'] = function(Container $container) {
107 105
             $translator = new Translator($container['config']['locale']);
108 106
             $translator->setFallbackLocales(['en']);
109 107
 
@@ -113,7 +111,7 @@  discard block
 block discarded – undo
113 111
 
114 112
             return $translator;
115 113
         };
116
-        $container['twig'] = function (Container $container) {
114
+        $container['twig'] = function(Container $container) {
117 115
             $twig = new Twig(__DIR__.'/../resources/views/', [
118 116
                 'debug' => $container['config']['debug'],
119 117
             ]);
@@ -123,23 +121,23 @@  discard block
 block discarded – undo
123 121
 
124 122
             return $twig;
125 123
         };
126
-        $container['session'] = function () {
124
+        $container['session'] = function() {
127 125
             return new Session();
128 126
         };
129
-        $container['controllerDecorator'] = function (Container $container) {
127
+        $container['controllerDecorator'] = function(Container $container) {
130 128
             return new ControllerDecorator(
131 129
                 $container['twig'],
132 130
                 $container['router'],
133 131
                 $container['session']
134 132
             );
135 133
         };
136
-        $container['callableResolver'] = function (Container $container) {
134
+        $container['callableResolver'] = function(Container $container) {
137 135
             return new DecoratingCallableResolver(
138 136
                 $container,
139 137
                 $container['controllerDecorator']
140 138
             );
141 139
         };
142
-        $container['dbal'] = function (Container $container) {
140
+        $container['dbal'] = function(Container $container) {
143 141
             $config = new Configuration();
144 142
 
145 143
             return DriverManager::getConnection([
@@ -154,12 +152,12 @@  discard block
 block discarded – undo
154 152
         };
155 153
 
156 154
         // Controllers
157
-        $container[PasteController::class] = function (Container $container) {
155
+        $container[PasteController::class] = function(Container $container) {
158 156
             $pasteRepository = new DbalPasteRepository($container['dbal'], new DbalPasteMapper());
159 157
 
160 158
             return new PasteController($pasteRepository, new AES256Crypter());
161 159
         };
162
-        $container[ErrorController::class] = function (Container $container) {
160
+        $container[ErrorController::class] = function(Container $container) {
163 161
             /** @var ControllerDecorator $controllerDecorator */
164 162
             $controllerDecorator = $container['controllerDecorator'];
165 163
 
Please login to merge, or discard this patch.
src/Twig/TransExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Nastoletni\Code\Twig;
6 6
 
Please login to merge, or discard this patch.