@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace Linio\Tortilla\Provider; |
5 | 5 | |
@@ -16,12 +16,12 @@ discard block |
||
16 | 16 | */ |
17 | 17 | public function register(Container $app) |
18 | 18 | { |
19 | - $app['logger'] = function () use ($app) { |
|
19 | + $app['logger'] = function() use ($app) { |
|
20 | 20 | return $app['monolog']; |
21 | 21 | }; |
22 | 22 | |
23 | 23 | $app['monolog.logger.class'] = 'Monolog\\Logger'; |
24 | - $app['monolog'] = function ($app) { |
|
24 | + $app['monolog'] = function($app) { |
|
25 | 25 | $log = new $app['monolog.logger.class']($app['monolog.name']); |
26 | 26 | $log->pushHandler($app['monolog.handler']); |
27 | 27 | |
@@ -32,18 +32,18 @@ discard block |
||
32 | 32 | return $log; |
33 | 33 | }; |
34 | 34 | |
35 | - $app['monolog.formatter'] = function () { |
|
35 | + $app['monolog.formatter'] = function() { |
|
36 | 36 | return new LineFormatter(); |
37 | 37 | }; |
38 | 38 | |
39 | - $app['monolog.handler'] = function () use ($app) { |
|
39 | + $app['monolog.handler'] = function() use ($app) { |
|
40 | 40 | $handler = new StreamHandler($app['monolog.logfile'], $app['monolog.level'], $app['monolog.bubble'], $app['monolog.permission']); |
41 | 41 | $handler->setFormatter($app['monolog.formatter']); |
42 | 42 | |
43 | 43 | return $handler; |
44 | 44 | }; |
45 | 45 | |
46 | - $app['monolog.level'] = function () { |
|
46 | + $app['monolog.level'] = function() { |
|
47 | 47 | return Logger::DEBUG; |
48 | 48 | }; |
49 | 49 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace Linio\Tortilla; |
5 | 5 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace Linio\Tortilla; |
5 | 5 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace Linio\Tortilla; |
5 | 5 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace Linio\Tortilla; |
5 | 5 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace Linio\Tortilla; |
5 | 5 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace Linio\Tortilla; |
5 | 5 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace Linio\Tortilla; |
5 | 5 |
@@ -1,5 +1,5 @@ discard block |
||
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 |
||
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 |
||
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 |