Completed
Pull Request — feature-output-formats (#242)
by Arnaud
06:22 queued 04:23
created
src/Generator/GeneratorInterface.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -17,6 +17,7 @@
 block discarded – undo
17 17
      * Give config to object.
18 18
      *
19 19
      * @param \Cecil\Config $config
20
+     * @return void
20 21
      */
21 22
     public function __construct(\Cecil\Config $config);
22 23
 
Please login to merge, or discard this patch.
src/Step/StepInterface.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -16,6 +16,7 @@
 block discarded – undo
16 16
      * StepInterface constructor.
17 17
      *
18 18
      * @param Builder $builder
19
+     * @return void
19 20
      */
20 21
     public function __construct(Builder $builder);
21 22
 
Please login to merge, or discard this patch.
src/Collection/Collection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@
 block discarded – undo
169 169
      */
170 170
     public function usort(\Closure $callback = null): CollectionInterface
171 171
     {
172
-        $callback ? uasort($this->items, $callback) : uasort($this->items, function ($a, $b) {
172
+        $callback ? uasort($this->items, $callback) : uasort($this->items, function($a, $b) {
173 173
             if ($a == $b) {
174 174
                 return 0;
175 175
             }
Please login to merge, or discard this patch.
src/Collection/Taxonomy/Term.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      */
24 24
     public function sortByDate(): self
25 25
     {
26
-        return $this->usort(function ($a, $b) {
26
+        return $this->usort(function($a, $b) {
27 27
             if (!isset($a['date'])) {
28 28
                 return -1;
29 29
             }
Please login to merge, or discard this patch.
src/Collection/Page/Collection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      */
24 24
     public function sortByDate(): self
25 25
     {
26
-        return $this->usort(function ($a, $b) {
26
+        return $this->usort(function($a, $b) {
27 27
             if (!isset($a['date'])) {
28 28
                 return -1;
29 29
             }
Please login to merge, or discard this patch.
src/Step/PagesRender.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->builder->getPages()->filter(function (Page $page) {
55
+        $filteredPages = $this->builder->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->builder->getRenderer()->addGlobal('site', array_merge(
112 112
             $this->config->get('site'),
113 113
             ['menus' => $this->builder->getMenus()],
114
-            ['pages' => $this->builder->getPages()->filter(function (Page $page) {
114
+            ['pages' => $this->builder->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/Step/PagesGenerate.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->builder->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->builder->getMessageCb(), ['GENERATE_ERROR', $message]);
Please login to merge, or discard this patch.
src/Step/PagesSave.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->builder->getMessageCb(), ['SAVE', 'Saving pages']);
47 47
 
48 48
         /* @var $page Page */
49
-        $filteredPages = $this->builder->getPages()->filter(function (Page $page) {
49
+        $filteredPages = $this->builder->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/StaticCopy.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->builder->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->builder->getConfig()->get('static.exclude'))
66 66
                     && in_array($file->getBasename(), $this->builder->getConfig()->get('static.exclude')));
67 67
             })->in($staticDir);
Please login to merge, or discard this patch.