Passed
Push — analysis-Bo5Ae7 ( e81cd4 )
by Arnaud
18:39 queued 14:40
created
src/Renderer/Page.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
             $language = '';
68 68
         }
69 69
 
70
-        return \Cecil\Util::joinPath($language, $path, $subpath, $filename).$extension;
70
+        return \Cecil\Util::joinPath($language, $path, $subpath, $filename) . $extension;
71 71
     }
72 72
 
73 73
     /**
Please login to merge, or discard this patch.
src/Renderer/Extension/Core.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
     {
223 223
         $filteredPages = $pages->filter(function (Page $page) use ($variable, $value) {
224 224
             // is a dedicated getter exists?
225
-            $method = 'get'.ucfirst($variable);
225
+            $method = 'get' . ucfirst($variable);
226 226
             if (method_exists($page, $method) && $page->$method() == $value) {
227 227
                 return $page->getType() == Type::PAGE() && !$page->isVirtual() && true;
228 228
             }
@@ -562,7 +562,7 @@  discard block
 block discarded – undo
562 562
 
563 563
             // <img> element
564 564
             $img = sprintf(
565
-                '<img src="%s" width="'.($asset['width'] ?: '').'" height="'.($asset['height'] ?: '').'"%s>',
565
+                '<img src="%s" width="' . ($asset['width'] ?: '') . '" height="' . ($asset['height'] ?: '') . '"%s>',
566 566
                 $this->url($asset, $options),
567 567
                 $htmlAttributes
568 568
             );
@@ -678,8 +678,8 @@  discard block
 block discarded – undo
678 678
         extract($options, EXTR_IF_EXISTS);
679 679
 
680 680
         // https://regex101.com/r/n9TWHF/1
681
-        $pattern = '(.*)<!--[[:blank:]]?('.$separator.')[[:blank:]]?-->(.*)';
682
-        preg_match('/'.$pattern.'/is', $string, $matches);
681
+        $pattern = '(.*)<!--[[:blank:]]?(' . $separator . ')[[:blank:]]?-->(.*)';
682
+        preg_match('/' . $pattern . '/is', $string, $matches);
683 683
 
684 684
         if (empty($matches)) {
685 685
             return $string;
@@ -922,7 +922,7 @@  discard block
 block discarded – undo
922 922
         }
923 923
         $hex = ltrim($variable, '#');
924 924
         if (\strlen($hex) == 3) {
925
-            $hex = $hex[0].$hex[0].$hex[1].$hex[1].$hex[2].$hex[2];
925
+            $hex = $hex[0] . $hex[0] . $hex[1] . $hex[1] . $hex[2] . $hex[2];
926 926
         }
927 927
         $c = hexdec($hex);
928 928
 
Please login to merge, or discard this patch.
src/Generator/Pagination.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
             for ($i = 0; $i < $paginatorPagesCount; $i++) {
74 74
                 $itPagesInPagination = new \LimitIterator($pages->getIterator(), $i * $paginationPerPage, $paginationPerPage);
75 75
                 $pagesInPagination = new PagesCollection(
76
-                    $page->getId().'-page-'.($i + 1),
76
+                    $page->getId() . '-page-' . ($i + 1),
77 77
                     iterator_to_array($itPagesInPagination)
78 78
                 );
79 79
                 $alteredPage = clone $page;
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
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
         $this->builder = $builder;
40 40
         $this->config = $builder->getConfig();
41 41
         // Creates a new empty collection
42
-        $this->generatedPages = new PagesCollection('generator-'.Util::formatClassName($this, ['lowercase' => true]));
42
+        $this->generatedPages = new PagesCollection('generator-' . Util::formatClassName($this, ['lowercase' => true]));
43 43
     }
44 44
 
45 45
     /**
Please login to merge, or discard this patch.
src/Util/Plateform.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -65,16 +65,16 @@
 block discarded – undo
65 65
     public static function openBrowser(string $url): void
66 66
     {
67 67
         if (self::isWindows()) {
68
-            passthru('start "web" explorer "'.$url.'"');
68
+            passthru('start "web" explorer "' . $url . '"');
69 69
 
70 70
             return;
71 71
         }
72 72
         passthru('which xdg-open', $linux);
73 73
         passthru('which open', $osx);
74 74
         if (0 === $linux) {
75
-            passthru('xdg-open '.$url);
75
+            passthru('xdg-open ' . $url);
76 76
         } elseif (0 === $osx) {
77
-            passthru('open '.$url);
77
+            passthru('open ' . $url);
78 78
         }
79 79
     }
80 80
 
Please login to merge, or discard this patch.
src/Builder.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         $this->options = array_merge([
140 140
             'drafts'  => false, // build drafts or not
141 141
             'dry-run' => false, // if dry-run is true, generated files are not saved
142
-            'page'    => '',    // specific page to build
142
+            'page'    => '', // specific page to build
143 143
         ], $options);
144 144
 
145 145
         // process each step
@@ -369,9 +369,9 @@  discard block
 block discarded – undo
369 369
     public static function getVersion(): string
370 370
     {
371 371
         if (!isset(self::$version)) {
372
-            $filePath = __DIR__.'/../VERSION';
372
+            $filePath = __DIR__ . '/../VERSION';
373 373
             if (Plateform::isPhar()) {
374
-                $filePath = Plateform::getPharPath().'/VERSION';
374
+                $filePath = Plateform::getPharPath() . '/VERSION';
375 375
             }
376 376
 
377 377
             try {
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
             $this->getLogger()->error('Config: `baseurl` is required in production (e.g.: "baseurl: https://example.com/").');
402 402
         }
403 403
         // default language
404
-        if (!preg_match('/^'.Config::LANG_CODE_PATTERN.'$/', (string) $this->config->get('language'))) {
404
+        if (!preg_match('/^' . Config::LANG_CODE_PATTERN . '$/', (string) $this->config->get('language'))) {
405 405
             throw new RuntimeException(sprintf('Config: default language code "%s" is not valid (e.g.: "language: fr-FR").', $this->config->get('language')));
406 406
         }
407 407
         // locales
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
             if (!isset($lang['locale'])) {
410 410
                 throw new RuntimeException('Config: a language locale is not defined.');
411 411
             }
412
-            if (!preg_match('/^'.Config::LANG_LOCALE_PATTERN.'$/', $lang['locale'])) {
412
+            if (!preg_match('/^' . Config::LANG_LOCALE_PATTERN . '$/', $lang['locale'])) {
413 413
                 throw new RuntimeException(sprintf('Config: the language locale "%s" is not valid (e.g.: "locale: fr_FR").', $lang['locale']));
414 414
             }
415 415
         }
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
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
                     $path[] = $iterator->getSubIterator($depth)->key();
81 81
                 }
82 82
                 $sPath = implode('_', $path);
83
-                if ($getEnv = getenv('CECIL_'.strtoupper($sPath))) {
83
+                if ($getEnv = getenv('CECIL_' . strtoupper($sPath))) {
84 84
                     $data->set(str_replace('_', '.', strtolower($sPath)), $this->castSetValue($getEnv));
85 85
                 }
86 86
                 $iterator->next();
Please login to merge, or discard this patch.
src/Step/Taxonomies/Create.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
                             ));
122 122
                         }
123 123
                         // e.g.: "Tag 1" -> "tags/tag-1"
124
-                        $termId = Page::slugify($plural.'/'.(string) $termName);
124
+                        $termId = Page::slugify($plural . '/' . (string) $termName);
125 125
                         $term = (new Term($termId))->setName((string) $termName);
126 126
                         $this->vocabCollection[$language]
127 127
                             ->get($plural)
Please login to merge, or discard this patch.
src/Step/Menus/Create.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,8 +74,8 @@
 block discarded – undo
74 74
                 $page404 = '404.html';
75 75
 
76 76
                 if ($language['code'] !== $this->config->getLanguageDefault()) {
77
-                    $langPrefix = $language['code'].'/';
78
-                    $page404 = $language['code'].'/404.html';
77
+                    $langPrefix = $language['code'] . '/';
78
+                    $page404 = $language['code'] . '/404.html';
79 79
                 }
80 80
 
81 81
                 foreach ($menusConfig as $menuConfig => $entry) {
Please login to merge, or discard this patch.