Passed
Push — analysis-VBDRx3 ( 70d75f )
by Arnaud
04:38 queued 26s
created
src/Collection/Page/Collection.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public function showable(): self
27 27
     {
28
-        return $this->filter(function (Page $page) {
28
+        return $this->filter(function(Page $page) {
29 29
             if ($page->getVariable('published') === true
30 30
                 && $page->isVirtual() === false
31 31
                 && $page->getVariable('redirect') === null
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         $options['descTitle'] = $options['descTitle'] ?? false;
60 60
         $options['reverse'] = $options['reverse'] ?? false;
61 61
 
62
-        return $this->usort(function ($a, $b) use ($options) {
62
+        return $this->usort(function($a, $b) use ($options) {
63 63
             if ($a[$options['variable']] == $b[$options['variable']]) {
64 64
                 // if dates are equal and "descTitle" is true
65 65
                 if ($options['descTitle'] && (isset($a['title']) && isset($b['title']))) {
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
             $options['reverse'] = false;
84 84
         }
85 85
 
86
-        return $this->usort(function ($a, $b) use ($options) {
86
+        return $this->usort(function($a, $b) use ($options) {
87 87
             return ($options['reverse'] ? -1 : 1) * strnatcmp($a['title'], $b['title']);
88 88
         });
89 89
     }
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             $options['reverse'] = false;
99 99
         }
100 100
 
101
-        return $this->usort(function ($a, $b) use ($options) {
101
+        return $this->usort(function($a, $b) use ($options) {
102 102
             if ($a['weight'] == $b['weight']) {
103 103
                 return 0;
104 104
             }
Please login to merge, or discard this patch.
src/Renderer/Twig/Extension.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
      */
214 214
     public function filterBy(PagesCollection $pages, string $variable, string $value): CollectionInterface
215 215
     {
216
-        $filteredPages = $pages->filter(function (Page $page) use ($variable, $value) {
216
+        $filteredPages = $pages->filter(function(Page $page) use ($variable, $value) {
217 217
             // is a dedicated getter exists?
218 218
             $method = 'get'.ucfirst($variable);
219 219
             if (method_exists($page, $method) && $page->$method() == $value) {
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
      */
248 248
     public function sortByWeight(\Traversable $collection, bool $reverse = false): array
249 249
     {
250
-        $callback = function ($a, $b) use ($reverse) {
250
+        $callback = function($a, $b) use ($reverse) {
251 251
             if (!isset($a['weight'])) {
252 252
                 $a['weight'] = 0;
253 253
             }
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
      */
274 274
     public function sortByDate(\Traversable $collection, string $variable = 'date', bool $reverse = false, bool $descTitle = false): array
275 275
     {
276
-        $callback = function ($a, $b) use ($variable, $reverse, $descTitle) {
276
+        $callback = function($a, $b) use ($variable, $reverse, $descTitle) {
277 277
             if ($a[$variable] == $b[$variable]) {
278 278
                 // if dates are equal and "descTitle" is true
279 279
                 if ($descTitle && (isset($a['title']) && isset($b['title']))) {
Please login to merge, or discard this patch.