Completed
Push — collection ( 95bf13...b56131 )
by Arnaud
01:59
created
src/Renderer/Twig/Extension.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     public function filterBy(PageCollection $pages, string $variable, string $value): CollectionInterface
118 118
     {
119
-        $filteredPages = $pages->filter(function (Page $page) use ($variable, $value) {
119
+        $filteredPages = $pages->filter(function(Page $page) use ($variable, $value) {
120 120
             // dedicated getter?
121 121
             $method = 'get'.ucfirst($variable);
122 122
             if (method_exists($page, $method) && $page->$method() == $value) {
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
      */
159 159
     public function sortByWeight($array)
160 160
     {
161
-        $callback = function ($a, $b) {
161
+        $callback = function($a, $b) {
162 162
             if (!isset($a['weight'])) {
163 163
                 return 1;
164 164
             }
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      */
192 192
     public function sortByDate($array)
193 193
     {
194
-        $callback = function ($a, $b) {
194
+        $callback = function($a, $b) {
195 195
             if (!isset($a['date'])) {
196 196
                 return -1;
197 197
             }
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
             return '1';
453 453
         }
454 454
 
455
-        return (string)$min;
455
+        return (string) $min;
456 456
     }
457 457
 
458 458
     /**
Please login to merge, or discard this patch.
src/Collection/Page/Page.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -125,16 +125,16 @@
 block discarded – undo
125 125
             // file as a prefix?
126 126
             if (false !== self::getPrefix($this->fileId)) {
127 127
                 // prefix is a valid date?
128
-                $isValidDate = function ($date, $format = 'Y-m-d') {
128
+                $isValidDate = function($date, $format = 'Y-m-d') {
129 129
                     $d = \DateTime::createFromFormat($format, $date);
130 130
 
131 131
                     return $d && $d->format($format) === $date;
132 132
                 };
133 133
                 if ($isValidDate(self::getPrefix($this->fileId))) {
134
-                    $this->setDate((string)self::getPrefix($this->fileId));
134
+                    $this->setDate((string) self::getPrefix($this->fileId));
135 135
                 } else {
136 136
                     // prefix is an integer
137
-                    $this->setWeight((int)self::getPrefix($this->fileId));
137
+                    $this->setWeight((int) self::getPrefix($this->fileId));
138 138
                 }
139 139
             }
140 140
             // permalink
Please login to merge, or discard this patch.