Passed
Push — composer ( db7ce1...410bcb )
by Arnaud
04:18
created
src/Generator/Pagination.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
         }
30 30
 
31 31
         // filters pages: home, sections and terms
32
-        $filteredPages = $this->builder->getPages()->filter(function (Page $page) {
32
+        $filteredPages = $this->builder->getPages()->filter(function(Page $page) {
33 33
             return in_array($page->getType(), [Type::HOMEPAGE, Type::SECTION, Type::TERM]);
34 34
         });
35 35
         /** @var Page $page */
Please login to merge, or discard this patch.
src/Generator/Redirect.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      */
23 23
     public function generate(): void
24 24
     {
25
-        $filteredPages = $this->builder->getPages()->filter(function (Page $page) {
25
+        $filteredPages = $this->builder->getPages()->filter(function(Page $page) {
26 26
             return null !== $page->getVariable('redirect')
27 27
                 && $page->getVariable('layout') != 'redirect';
28 28
         });
Please login to merge, or discard this patch.
src/Step/PagesGenerate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         $generatorManager = new GeneratorManager($this->builder);
46 46
 
47 47
         // loads local generators
48
-        spl_autoload_register(function ($className) {
48
+        spl_autoload_register(function($className) {
49 49
             $generatorFile = Util::joinFile($this->config->getDestinationDir(), 'generators', "$className.php");
50 50
             if (file_exists($generatorFile)) {
51 51
                 require $generatorFile;
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         });
54 54
 
55 55
         $generators = (array) $this->builder->getConfig()->get('generators');
56
-        array_walk($generators, function ($generator, $priority) use ($generatorManager) {
56
+        array_walk($generators, function($generator, $priority) use ($generatorManager) {
57 57
             if (!class_exists($generator)) {
58 58
                 $message = sprintf('Unable to load generator "%s"', $generator);
59 59
                 $this->builder->getLogger()->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
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
     public function process()
54 54
     {
55 55
         /** @var Page $page */
56
-        $filteredPages = $this->builder->getPages()->filter(function (Page $page) {
56
+        $filteredPages = $this->builder->getPages()->filter(function(Page $page) {
57 57
             return !empty($page->getVariable('rendered'));
58 58
         });
59 59
         $max = count($filteredPages);
Please login to merge, or discard this patch.
src/Util.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
      */
131 131
     public static function joinPath(string ...$path): string
132 132
     {
133
-        array_walk($path, function (&$value, $key) {
133
+        array_walk($path, function(&$value, $key) {
134 134
             $value = str_replace('\\', '/', $value);
135 135
             $value = rtrim($value, '/');
136 136
             $value = $key == 0 ? $value : ltrim($value, '/');
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      */
149 149
     public static function joinFile(string ...$path): string
150 150
     {
151
-        array_walk($path, function (&$value, $key) use (&$path) {
151
+        array_walk($path, function(&$value, $key) use (&$path) {
152 152
             $value = str_replace(['\\', '/'], [DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR], $value);
153 153
             $value = rtrim($value, DIRECTORY_SEPARATOR);
154 154
             $value = $key == 0 ? $value : ltrim($value, DIRECTORY_SEPARATOR);
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
     public static function fileGetContents($filename)
218 218
     {
219 219
         set_error_handler(
220
-            function ($severity, $message, $file, $line) {
220
+            function($severity, $message, $file, $line) {
221 221
                 throw new \ErrorException($message, 0, $severity, $file, $line, null);
222 222
             }
223 223
         );
Please login to merge, or discard this patch.
src/Assets/Image.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
             // creates an image object
84 84
             try {
85 85
                 $img = ImageManager::make($source);
86
-                $img->resize($this->size, null, function (\Intervention\Image\Constraint $constraint) {
86
+                $img->resize($this->size, null, function(\Intervention\Image\Constraint $constraint) {
87 87
                     $constraint->aspectRatio();
88 88
                     $constraint->upsize();
89 89
                 });
Please login to merge, or discard this patch.
src/Assets/Url.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -105,8 +105,7 @@
 block discarded – undo
105 105
                         $this->url = $value;
106 106
                         break;
107 107
                     // asset as string
108
-                    case false !== strpos($value, '.') ? true : false:
109
-                        $this->url = $base.'/'.ltrim($value, '/');
108
+                    case false !== strpos($value, '.') ? true : false : $this->url = $base.'/'.ltrim($value, '/');
110 109
                         break;
111 110
                     // Page ID as string
112 111
                     case $this->builder->getPages()->has($pageId):
Please login to merge, or discard this patch.
config/default.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,14 +13,14 @@
 block discarded – undo
13 13
     'title'        => '',
14 14
     'baseline'     => '',
15 15
     'baseurl'      => 'http://localhost:8000/',
16
-    'canonicalurl' => false,   // if true 'url()' function preprends URL wirh 'baseurl'
16
+    'canonicalurl' => false, // if true 'url()' function preprends URL wirh 'baseurl'
17 17
     'description'  => '',
18
-    'taxonomies'   => [        // default taxonomies
18
+    'taxonomies'   => [// default taxonomies
19 19
         'tags'       => 'tag', // can be disabled with 'disabled' value
20 20
         'categories' => 'category',
21 21
     ],
22 22
     'pagination' => [
23
-        'max'  => 5,      // number of pages on each paginated pages
23
+        'max'  => 5, // number of pages on each paginated pages
24 24
         'path' => 'page', // path to paginated pages. ie: '/blog/page/2/'
25 25
     ],
26 26
     'date' => [
Please login to merge, or discard this patch.
src/Generator/Homepage.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 generate(): void
25 25
     {
26
-        $subPages = $this->builder->getPages()->filter(function (Page $page) {
26
+        $subPages = $this->builder->getPages()->filter(function(Page $page) {
27 27
             return $page->getType() == TYPE::PAGE
28 28
                 && $page->getId() != 'index' // excludes homepage
29 29
                 && $page->isVirtual() === false; // excludes virtual pages
Please login to merge, or discard this patch.