Completed
Push — master ( 371a5c...c3a965 )
by Albert
01:48
created
web/index.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
 use Nastoletni\Code\AppKernel;
6 6
 
Please login to merge, or discard this patch.
src/AppKernel.php 1 patch
Spacing   +15 added lines, -17 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
 
@@ -66,40 +66,38 @@  discard block
 block discarded – undo
66 66
     {
67 67
         $container = $this->slim->getContainer();
68 68
         $container['settings']['displayErrorDetails'] = $container['config']['debug'];
69
-        $container['logger'] = function () {
69
+        $container['logger'] = function() {
70 70
             return new Logger('application', [
71 71
                 new StreamHandler(__DIR__.'/../logs/logs.log'),
72 72
             ]);
73 73
         };
74
-        $container['foundHandler'] = function () {
74
+        $container['foundHandler'] = function() {
75 75
             return new RequestResponseArgs();
76 76
         };
77
-        $container['notFoundHandler'] = function (Container $container) {
77
+        $container['notFoundHandler'] = function(Container $container) {
78 78
             return [$container[ErrorController::class], 'notFound'];
79 79
         };
80
-        $container['errorHandler'] = function (Container $container) {
80
+        $container['errorHandler'] = function(Container $container) {
81 81
             // Show pretty error page on production and Slim debug info on development.
82 82
             $next = $container['config']['debug'] ?
83
-                new Error($container['config']['debug']) :
84
-                [$container[ErrorController::class], 'error'];
83
+                new Error($container['config']['debug']) : [$container[ErrorController::class], 'error'];
85 84
 
86 85
             return new Slim\Handler\LoggingErrorHandler(
87 86
                 $container->get('logger'),
88 87
                 $next
89 88
             );
90 89
         };
91
-        $container['phpErrorHandler'] = function (Container $container) {
90
+        $container['phpErrorHandler'] = function(Container $container) {
92 91
             // Show pretty error page on production and Slim debug info on development.
93 92
             $next = $container['config']['debug'] ?
94
-                new PhpError($container['config']['debug']) :
95
-                [$container[ErrorController::class], 'error'];
93
+                new PhpError($container['config']['debug']) : [$container[ErrorController::class], 'error'];
96 94
 
97 95
             return new Slim\Handler\LoggingErrorHandler(
98 96
                 $container->get('logger'),
99 97
                 $next
100 98
             );
101 99
         };
102
-        $container['twig'] = function (Container $container) {
100
+        $container['twig'] = function(Container $container) {
103 101
             $twig = new Twig(__DIR__.'/../resources/views/', [
104 102
                 'debug' => $container['config']['debug'],
105 103
             ]);
@@ -108,23 +106,23 @@  discard block
 block discarded – undo
108 106
 
109 107
             return $twig;
110 108
         };
111
-        $container['session'] = function () {
109
+        $container['session'] = function() {
112 110
             return new Session();
113 111
         };
114
-        $container['controllerDecorator'] = function (Container $container) {
112
+        $container['controllerDecorator'] = function(Container $container) {
115 113
             return new ControllerDecorator(
116 114
                 $container['twig'],
117 115
                 $container['router'],
118 116
                 $container['session']
119 117
             );
120 118
         };
121
-        $container['callableResolver'] = function (Container $container) {
119
+        $container['callableResolver'] = function(Container $container) {
122 120
             return new DecoratingCallableResolver(
123 121
                 $container,
124 122
                 $container['controllerDecorator']
125 123
             );
126 124
         };
127
-        $container['dbal'] = function (Container $container) {
125
+        $container['dbal'] = function(Container $container) {
128 126
             $config = new Configuration();
129 127
 
130 128
             return DriverManager::getConnection([
@@ -138,12 +136,12 @@  discard block
 block discarded – undo
138 136
         };
139 137
 
140 138
         // Controllers
141
-        $container[PasteController::class] = function (Container $container) {
139
+        $container[PasteController::class] = function(Container $container) {
142 140
             $pasteRepository = new DbalPasteRepository($container['dbal'], new DbalPasteMapper());
143 141
 
144 142
             return new PasteController($pasteRepository, new AES256Crypter());
145 143
         };
146
-        $container[ErrorController::class] = function (Container $container) {
144
+        $container[ErrorController::class] = function(Container $container) {
147 145
             /** @var ControllerDecorator $controllerDecorator */
148 146
             $controllerDecorator = $container['controllerDecorator'];
149 147
 
Please login to merge, or discard this patch.
src/Slim/Handler/LoggingErrorHandler.php 1 patch
Spacing   +2 added lines, -2 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\Slim\Handler;
6 6
 
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      * @param LoggerInterface $logger
28 28
      * @param callable|null   $nextHandler
29 29
      */
30
-    public function __construct(LoggerInterface $logger, ?callable $nextHandler = null)
30
+    public function __construct(LoggerInterface $logger, ? callable $nextHandler = null)
31 31
     {
32 32
         $this->logger = $logger;
33 33
         $this->nextHandler = $nextHandler;
Please login to merge, or discard this patch.
src/Slim/DecoratingCallableResolver.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\Slim;
6 6
 
Please login to merge, or discard this patch.
src/Slim/Middleware/SymfonySessionMiddleware.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\Slim\Middleware;
6 6
 
Please login to merge, or discard this patch.
src/Twig/SymfonyValidatorExtension.php 1 patch
Spacing   +2 added lines, -2 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\Twig;
6 6
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      *
29 29
      * @return iterable
30 30
      */
31
-    public function error(string $field, ?ConstraintViolationListInterface $errors): iterable
31
+    public function error(string $field, ? ConstraintViolationListInterface $errors) : iterable
32 32
     {
33 33
         if (is_null($errors)) {
34 34
             return;
Please login to merge, or discard this patch.
src/UserInterface/Controller/AbstractController.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\UserInterface\Controller;
6 6
 
Please login to merge, or discard this patch.
src/UserInterface/Web/Controller/PasteController.php 2 patches
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\UserInterface\Web\Controller;
6 6
 
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,9 +8,9 @@
 block discarded – undo
8 8
 use Nastoletni\Code\Application\Crypter\PasteCrypter;
9 9
 use Nastoletni\Code\Application\Form\CreatePasteFormValidator;
10 10
 use Nastoletni\Code\Application\Service\CreatePasteService;
11
+use Nastoletni\Code\Domain\PasteRepository;
11 12
 use Nastoletni\Code\Domain\Paste\Id;
12 13
 use Nastoletni\Code\Domain\Paste\NotExistsException;
13
-use Nastoletni\Code\Domain\PasteRepository;
14 14
 use Nastoletni\Code\UserInterface\Controller\AbstractController;
15 15
 use Psr\Http\Message\ResponseInterface as Response;
16 16
 use Psr\Http\Message\ServerRequestInterface as Request;
Please login to merge, or discard this patch.
src/Application/Service/CreatePasteService.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\Application\Service;
6 6
 
Please login to merge, or discard this patch.