Passed
Branch master (6c4ac7)
by Victor
02:04
created
Category
src/Twig/NodeVisitor/ModelNodeVisitor.php 1 patch
Spacing   +2 added lines, -2 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 Shoot\Shoot\Twig\NodeVisitor;
5 5
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      *
62 62
      * @return string The name of the presentation model.
63 63
      */
64
-    public function for(string $view): string
64
+    public function for (string $view): string
65 65
     {
66 66
         return $this->presentationModels[$view] ?? PresentationModel::class;
67 67
     }
Please login to merge, or discard this patch.
src/Twig/Node/ModelNode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Shoot\Shoot\Twig\Node;
5 5
 
Please login to merge, or discard this patch.
src/Twig/Node/FindPresentationModelInterface.php 1 patch
Spacing   +2 added lines, -2 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 Shoot\Shoot\Twig\Node;
5 5
 
@@ -15,5 +15,5 @@  discard block
 block discarded – undo
15 15
      *
16 16
      * @return string The name of the presentation model.
17 17
      */
18
-    public function for(string $view): string;
18
+    public function for (string $view): string;
19 19
 }
Please login to merge, or discard this patch.
src/Twig/TokenParser/ModelTokenParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Shoot\Shoot\Twig\TokenParser;
5 5
 
Please login to merge, or discard this patch.
src/Pipeline.php 1 patch
Spacing   +6 added lines, -6 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 Shoot\Shoot;
5 5
 
@@ -41,11 +41,11 @@  discard block
 block discarded – undo
41 41
     {
42 42
         $middleware = array_reverse($middleware);
43 43
 
44
-        return array_reduce($middleware, function (callable $next, MiddlewareInterface $middleware) {
45
-            return function (View $view) use ($middleware, $next): View {
44
+        return array_reduce($middleware, function(callable $next, MiddlewareInterface $middleware) {
45
+            return function(View $view) use ($middleware, $next): View {
46 46
                 return $middleware->process($view, $this->context, $next);
47 47
             };
48
-        }, function (View $view): View {
48
+        }, function(View $view): View {
49 49
             $view->render();
50 50
 
51 51
             return $view;
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     public function getFilters(): array
117 117
     {
118 118
         return [
119
-            new TwigFilter('variables', function (PresentationModel $presentationModel): array {
119
+            new TwigFilter('variables', function(PresentationModel $presentationModel): array {
120 120
                 return $presentationModel->getVariables();
121 121
             })
122 122
         ];
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
     public function getTests(): array
161 161
     {
162 162
         return [
163
-            new TwigTest('model', function ($value): bool {
163
+            new TwigTest('model', function($value): bool {
164 164
                 return $value instanceof PresentationModel;
165 165
             })
166 166
         ];
Please login to merge, or discard this patch.
src/View.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Shoot\Shoot;
5 5
 
Please login to merge, or discard this patch.
src/Middleware/PresenterMiddleware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Shoot\Shoot\Middleware;
5 5
 
Please login to merge, or discard this patch.
tests/PipelineTest.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 Shoot\Shoot\Tests;
5 5
 
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     {
23 23
         $wasCalled = false;
24 24
 
25
-        $middleware = new Middleware(function () use (&$wasCalled) {
25
+        $middleware = new Middleware(function() use (&$wasCalled) {
26 26
             $wasCalled = true;
27 27
         });
28 28
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
         $pipeline = new Pipeline();
46 46
 
47
-        $view = ViewFactory::create(null, function () use (&$wasCalled) {
47
+        $view = ViewFactory::create(null, function() use (&$wasCalled) {
48 48
             $wasCalled = true;
49 49
         });
50 50
 
@@ -62,13 +62,13 @@  discard block
 block discarded – undo
62 62
 
63 63
         $view = ViewFactory::create();
64 64
 
65
-        $middleware = new Middleware(function (View $view, Context $context) use (&$hadContext) {
65
+        $middleware = new Middleware(function(View $view, Context $context) use (&$hadContext) {
66 66
             $hadContext = $context->getAttribute('string_attribute', '') !== '';
67 67
         });
68 68
 
69 69
         $pipeline = new Pipeline([$middleware]);
70 70
 
71
-        $pipeline->withContext(['string_attribute' => 'value'], function () use ($pipeline, $view) {
71
+        $pipeline->withContext(['string_attribute' => 'value'], function() use ($pipeline, $view) {
72 72
             $pipeline->process($view);
73 73
         });
74 74
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         $presentationModel = new PresentationModel(['variable' => 'value']);
89 89
 
90 90
         /** @var TwigFilter[] $filters */
91
-        $filters = array_filter($pipeline->getFilters(), function (TwigFilter $filter): bool {
91
+        $filters = array_filter($pipeline->getFilters(), function(TwigFilter $filter): bool {
92 92
             return $filter->getName() === 'variables';
93 93
         });
94 94
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         $presentationModel = new PresentationModel();
113 113
 
114 114
         /** @var TwigTest[] $tests */
115
-        $tests = array_filter($pipeline->getTests(), function (TwigTest $test): bool {
115
+        $tests = array_filter($pipeline->getTests(), function(TwigTest $test): bool {
116 116
             return $test->getName() === 'model';
117 117
         });
118 118
 
Please login to merge, or discard this patch.
tests/ContextTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Shoot\Shoot\Tests;
5 5
 
Please login to merge, or discard this patch.