Passed
Push — develop ( 47186b...746e68 )
by Brent
02:35
created
src/Stitcher/Page/Adapter/PaginationAdapter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
     public function __construct(array $adapterConfiguration, VariableParser $variableParser)
18 18
     {
19
-        if (! $this->isValid($adapterConfiguration)) {
19
+        if (!$this->isValid($adapterConfiguration)) {
20 20
             throw InvalidConfiguration::invalidAdapterConfiguration('pagination', '`variable`, `parameter`, `perPage`');
21 21
         }
22 22
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         return is_array($subject) && isset($subject['variable']) && isset($subject['parameter']);
59 59
     }
60 60
 
61
-    protected function getEntries(array $pageConfiguration): ?array
61
+    protected function getEntries(array $pageConfiguration): ? array
62 62
     {
63 63
         $variable = $pageConfiguration['variables'][$this->variable] ?? null;
64 64
         $entries = $this->variableParser->parse($variable)['entries']
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         ];
99 99
     }
100 100
 
101
-    protected function createPreviousPagination(string $pageId, int $pageIndex): ?array
101
+    protected function createPreviousPagination(string $pageId, int $pageIndex): ? array
102 102
     {
103 103
         if ($pageIndex <= 1) {
104 104
             return null;
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         ];
113 113
     }
114 114
 
115
-    protected function createNextPagination(string $pageId, int $pageIndex, int $pageCount): ?array
115
+    protected function createNextPagination(string $pageId, int $pageIndex, int $pageCount): ? array
116 116
     {
117 117
         if ($pageIndex >= $pageCount) {
118 118
             return null;
@@ -128,6 +128,6 @@  discard block
 block discarded – undo
128 128
 
129 129
     protected function createPaginatedUrl(string $pageId, int $index): string
130 130
     {
131
-        return str_replace('{' .$this->parameter. '}', "page-{$index}", $pageId);
131
+        return str_replace('{' . $this->parameter . '}', "page-{$index}", $pageId);
132 132
     }
133 133
 }
Please login to merge, or discard this patch.
src/Stitcher/Command/PartialParse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
         $matcher = new UrlMatcher($routeCollection, new RequestContext());
29 29
         $matchingRoute = $matcher->match($this->filter);
30 30
 
31
-        $filteredConfiguration = array_filter($parsedConfiguration, function ($key) use ($matchingRoute) {
31
+        $filteredConfiguration = array_filter($parsedConfiguration, function($key) use ($matchingRoute) {
32 32
             return $key === $matchingRoute['_route'];
33 33
         }, ARRAY_FILTER_USE_KEY);
34 34
 
Please login to merge, or discard this patch.
src/Stitcher/Renderer/RendererFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
         $this->setTwigRule();
19 19
     }
20 20
 
21
-    public static function make(string $templateDirectory, ?string $renderer = 'twig'): RendererFactory
21
+    public static function make(string $templateDirectory, ?string $renderer = 'twig') : RendererFactory
22 22
     {
23 23
         return new self($templateDirectory, $renderer);
24 24
     }
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
     private function setTwigRule(): void
40 40
     {
41
-        $this->setRule(TwigRenderer::class, function ($value) {
41
+        $this->setRule(TwigRenderer::class, function($value) {
42 42
             if ($value === 'twig') {
43 43
                 return TwigRenderer::make($this->templateDirectory);
44 44
             }
Please login to merge, or discard this patch.
src/Stitcher/Page/Adapter/CollectionAdapter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
     public function __construct(array $adapterConfiguration, VariableParser $variableParser)
17 17
     {
18
-        if (! $this->isValid($adapterConfiguration)) {
18
+        if (!$this->isValid($adapterConfiguration)) {
19 19
             throw InvalidConfiguration::invalidAdapterConfiguration('collection', '`variable` and `parameter`');
20 20
         }
21 21
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         return is_array($subject) && isset($subject['variable']) && isset($subject['parameter']);
49 49
     }
50 50
 
51
-    protected function getEntries($pageConfiguration): ?array
51
+    protected function getEntries($pageConfiguration): ? array
52 52
     {
53 53
         $variable = $pageConfiguration['variables'][$this->variable] ?? null;
54 54
 
Please login to merge, or discard this patch.