Completed
Push — include-lib ( fbd48a )
by Arnaud
02:41
created
src/Generator/Homepage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         $generatedPages = new PageCollection();
26 26
 
27 27
         if (!$pageCollection->has('index')) {
28
-            $filteredPages = $pageCollection->filter(function (Page $page) {
28
+            $filteredPages = $pageCollection->filter(function(Page $page) {
29 29
                 return $page->getNodeType() === null
30 30
                 && $page->getSection() == $this->config->get('site.paginate.homepage.section')
31 31
                 && !empty($page->getBody());
Please login to merge, or discard this patch.
src/Collection/Collection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
     public function usort(\Closure $callback = null)
167 167
     {
168 168
         $items = $this->items;
169
-        $callback ? uasort($items, $callback) : uasort($items, function ($a, $b) {
169
+        $callback ? uasort($items, $callback) : uasort($items, function($a, $b) {
170 170
             if ($a == $b) {
171 171
                 return 0;
172 172
             }
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
      */
185 185
     public function sortByDate()
186 186
     {
187
-        return $this->usort(function ($a, $b) {
187
+        return $this->usort(function($a, $b) {
188 188
             if (!isset($a['date'])) {
189 189
                 return -1;
190 190
             }
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
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      */
114 114
     public function filterBy($pages, $variable, $value)
115 115
     {
116
-        $filteredPages = $pages->filter(function (Page $page) use ($variable, $value) {
116
+        $filteredPages = $pages->filter(function(Page $page) use ($variable, $value) {
117 117
             // filter virtual pages in section
118 118
             if ($variable == 'section' && $page->getVariable('virtual')) {
119 119
                 return false;
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
      */
160 160
     public function sortByWeight($array)
161 161
     {
162
-        $callback = function ($a, $b) {
162
+        $callback = function($a, $b) {
163 163
             if (!isset($a['weight'])) {
164 164
                 return 1;
165 165
             }
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
      */
193 193
     public function sortByDate($array)
194 194
     {
195
-        $callback = function ($a, $b) {
195
+        $callback = function($a, $b) {
196 196
             if (!isset($a['date'])) {
197 197
                 return -1;
198 198
             }
Please login to merge, or discard this patch.
src/Step/CopyStatic.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
         $staticDir = $this->phpoole->getConfig()->getStaticPath();
62 62
         if (Util::getFS()->exists($staticDir)) {
63 63
             $finder = new Finder();
64
-            $finder->files()->filter(function (\SplFileInfo $file) {
64
+            $finder->files()->filter(function(\SplFileInfo $file) {
65 65
                 return !(is_array($this->phpoole->getConfig()->get('static.exclude'))
66 66
                     && in_array($file->getBasename(), $this->phpoole->getConfig()->get('static.exclude')));
67 67
             })->in($staticDir);
Please login to merge, or discard this patch.
src/Step/SavePages.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
         call_user_func_array($this->phpoole->getMessageCb(), ['SAVE', 'Saving pages']);
47 47
 
48 48
         /* @var $page Page */
49
-        $filteredPages = $this->phpoole->getPages()->filter(function (Page $page) {
49
+        $filteredPages = $this->phpoole->getPages()->filter(function(Page $page) {
50 50
             return !empty($page->getVariable('rendered'));
51 51
         });
52 52
         $max = count($filteredPages);
Please login to merge, or discard this patch.
src/Step/GeneratePages.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         if ($this->process) {
34 34
             $generatorManager = new GeneratorManager();
35 35
             $generators = $this->phpoole->getConfig()->get('generators');
36
-            array_walk($generators, function ($generator, $priority) use ($generatorManager) {
36
+            array_walk($generators, function($generator, $priority) use ($generatorManager) {
37 37
                 if (!class_exists($generator)) {
38 38
                     $message = sprintf("Unable to load generator '%s'", $generator);
39 39
                     call_user_func_array($this->phpoole->getMessageCb(), ['GENERATE_ERROR', $message]);
Please login to merge, or discard this patch.
src/Step/RenderPages.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
         // collect published pages
54 54
         /* @var $page Page */
55
-        $filteredPages = $this->phpoole->getPages()->filter(function (Page $page) {
55
+        $filteredPages = $this->phpoole->getPages()->filter(function(Page $page) {
56 56
             return !empty($page->getVariable('published'));
57 57
         });
58 58
         $max = count($filteredPages);
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         $this->phpoole->getRenderer()->addGlobal('site', array_merge(
112 112
             $this->config->get('site'),
113 113
             ['menus' => $this->phpoole->getMenus()],
114
-            ['pages' => $this->phpoole->getPages()->filter(function (Page $page) {
114
+            ['pages' => $this->phpoole->getPages()->filter(function(Page $page) {
115 115
                 return $page->getVariable('published');
116 116
             })],
117 117
             ['time' => time()]
Please login to merge, or discard this patch.
src/Config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@
 block discarded – undo
142 142
         /**
143 143
          * Apply environment variables.
144 144
          */
145
-        $applyEnv = function ($array) use ($data) {
145
+        $applyEnv = function($array) use ($data) {
146 146
             $iterator = new \RecursiveIteratorIterator(
147 147
                 new \RecursiveArrayIterator($array),
148 148
                 \RecursiveIteratorIterator::SELF_FIRST
Please login to merge, or discard this patch.