Passed
Push — feat/yamlparse ( cc4fab )
by Arnaud
05:02
created
src/Step/Pages/Generate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         $generatorManager = new GeneratorManager($this->builder);
47 47
 
48 48
         // loads local generators
49
-        spl_autoload_register(function ($className) {
49
+        spl_autoload_register(function($className) {
50 50
             $generatorFile = Util::joinFile($this->config->getSourceDir(), 'generators', "$className.php");
51 51
             if (file_exists($generatorFile)) {
52 52
                 require $generatorFile;
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         });
55 55
 
56 56
         $generators = (array) $this->builder->getConfig()->get('generators');
57
-        array_walk($generators, function ($generator, $priority) use ($generatorManager) {
57
+        array_walk($generators, function($generator, $priority) use ($generatorManager) {
58 58
             if (!class_exists($generator)) {
59 59
                 $message = \sprintf('Unable to load generator "%s".', $generator);
60 60
                 $this->builder->getLogger()->error($message);
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
@@ -119,8 +119,7 @@
 block discarded – undo
119 119
                         $this->url = (string) new self($this->builder, $page, $options);
120 120
                         break;
121 121
                     // asset as string
122
-                    case false !== strpos($value, '.') ? true : false:
123
-                        $this->url = $base.'/'.ltrim($value, '/');
122
+                    case false !== strpos($value, '.') ? true : false : $this->url = $base.'/'.ltrim($value, '/');
124 123
                         break;
125 124
                     // others cases?
126 125
                     default:
Please login to merge, or discard this patch.
src/Assets/Asset.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $this->builder = $builder;
72 72
         $this->config = $builder->getConfig();
73 73
         $paths = is_array($paths) ? $paths : [$paths];
74
-        array_walk($paths, function ($path) {
74
+        array_walk($paths, function($path) {
75 75
             if (empty($path)) {
76 76
                 throw new RuntimeException('The path parameter of "asset() can\'t be empty."');
77 77
             }
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
             'ext'            => '', // file extension
85 85
             'type'           => '', // file type (e.g.: image, audio, video, etc.)
86 86
             'subtype'        => '', // file media type (e.g.: image/png, audio/mp3, etc.)
87
-            'size'           => 0,  // file size (in bytes)
87
+            'size'           => 0, // file size (in bytes)
88 88
             'content_source' => '', // file content, before transformations
89 89
             'content'        => '', // file content, after transformations
90
-            'width'          => 0,  // width (in pixels) in case of an image
91
-            'height'         => 0,  // height (in pixels) in case of an image
90
+            'width'          => 0, // width (in pixels) in case of an image
91
+            'height'         => 0, // height (in pixels) in case of an image
92 92
         ];
93 93
 
94 94
         // handles options
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
 
423 423
             try {
424 424
                 $img = ImageManager::make($assetResized->data['content_source']);
425
-                $img->resize($width, null, function (\Intervention\Image\Constraint $constraint) {
425
+                $img->resize($width, null, function(\Intervention\Image\Constraint $constraint) {
426 426
                     $constraint->aspectRatio();
427 427
                     $constraint->upsize();
428 428
                 });
Please login to merge, or discard this patch.
src/Renderer/Site.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
      */
113 113
     public function getPages(): \Cecil\Collection\Page\Collection
114 114
     {
115
-        return $this->builder->getPages()->filter(function (CollectionPage $page) {
115
+        return $this->builder->getPages()->filter(function(CollectionPage $page) {
116 116
             // We should fix case of virtual pages without language
117 117
             if ($page->getLanguage() === null && $this->language == $this->config->getLanguageDefault()) {
118 118
                 return true;
Please login to merge, or discard this patch.
src/Generator/AbstractGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
         $this->generate();
51 51
 
52 52
         // set default language (ex: "en") if necessary
53
-        $this->generatedPages->map(function (\Cecil\Collection\Page\Page $page) {
53
+        $this->generatedPages->map(function(\Cecil\Collection\Page\Page $page) {
54 54
             if ($page->getLanguage() === null) {
55 55
                 $page->setLanguage($this->config->getLanguageDefault());
56 56
             }
Please login to merge, or discard this patch.
src/Step/Menus/Create.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
140 140
      */
141 141
     protected function collectPages(): void
142 142
     {
143
-        $filteredPages = $this->builder->getPages()->filter(function (Page $page) {
143
+        $filteredPages = $this->builder->getPages()->filter(function(Page $page) {
144 144
             return $page->hasVariable('menu')
145 145
                 && $page->getVariable('published')
146 146
                 && in_array($page->getLanguage() ?? $this->config->getLanguageDefault(), array_column($this->config->getLanguages(), 'code'));
Please login to merge, or discard this patch.