Passed
Push — master ( 7b7005...55ec05 )
by Brent
02:29
created
src/Brendt/Stitcher/Template/Twig/TwigEngine.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,9 +35,9 @@
 block discarded – undo
35 35
             'cache' => false,
36 36
         ]);
37 37
 
38
-        $this->addFunction(new \Twig_SimpleFunction('meta', [$templatePlugin, 'meta'], ['is_safe' => ['html'],]));
39
-        $this->addFunction(new \Twig_SimpleFunction('css', [$templatePlugin, 'css'], ['is_safe' => ['html'],]));
40
-        $this->addFunction(new \Twig_SimpleFunction('js', [$templatePlugin, 'js'], ['is_safe' => ['html'],]));
38
+        $this->addFunction(new \Twig_SimpleFunction('meta', [$templatePlugin, 'meta'], ['is_safe' => ['html'], ]));
39
+        $this->addFunction(new \Twig_SimpleFunction('css', [$templatePlugin, 'css'], ['is_safe' => ['html'], ]));
40
+        $this->addFunction(new \Twig_SimpleFunction('js', [$templatePlugin, 'js'], ['is_safe' => ['html'], ]));
41 41
         $this->addFunction(new \Twig_SimpleFunction('image', [$templatePlugin, 'image']));
42 42
         $this->addFunction(new \Twig_SimpleFunction('file', [$templatePlugin, 'file']));
43 43
     }
Please login to merge, or discard this patch.
src/Brendt/Stitcher/Factory/ParserFactory.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -38,35 +38,35 @@
 block discarded – undo
38 38
     public function __construct(ContainerInterface $container) {
39 39
         $this->container = $container;
40 40
 
41
-        self::addTypeFilter(self::EXTENSION_FOLDER, function ($fileName) {
41
+        self::addTypeFilter(self::EXTENSION_FOLDER, function($fileName) {
42 42
             return substr($fileName, -1) === '/';
43 43
         });
44 44
 
45
-        self::addTypeFilter(self::EXTENSION_JSON, function ($fileName) {
45
+        self::addTypeFilter(self::EXTENSION_JSON, function($fileName) {
46 46
             return strpos($fileName, '.json') === strlen($fileName) - 5;
47 47
         });
48 48
 
49
-        self::addTypeFilter(self::EXTENSION_MD, function ($fileName) {
49
+        self::addTypeFilter(self::EXTENSION_MD, function($fileName) {
50 50
             return strpos($fileName, '.md') !== false;
51 51
         });
52 52
 
53
-        self::addTypeFilter(self::EXTENSION_YML, function ($fileName) {
53
+        self::addTypeFilter(self::EXTENSION_YML, function($fileName) {
54 54
             return strpos($fileName, '.yaml') !== false || strpos($fileName, '.yml') !== false;
55 55
         });
56 56
 
57
-        self::addTypeFilter(self::EXTENSION_IMG, function ($fileName) {
57
+        self::addTypeFilter(self::EXTENSION_IMG, function($fileName) {
58 58
             return strpos($fileName, '.jpg') !== false || strpos($fileName, '.png') !== false;
59 59
         });
60 60
 
61
-        self::addTypeFilter(self::EXTENSION_CSS, function ($fileName) {
61
+        self::addTypeFilter(self::EXTENSION_CSS, function($fileName) {
62 62
             return strpos($fileName, '.css') !== false;
63 63
         });
64 64
 
65
-        self::addTypeFilter(self::EXTENSION_JS, function ($fileName) {
65
+        self::addTypeFilter(self::EXTENSION_JS, function($fileName) {
66 66
             return strpos($fileName, '.js') === strlen($fileName) - 3;
67 67
         });
68 68
 
69
-        self::addTypeFilter(self::EXTENSION_SASS, function ($fileName) {
69
+        self::addTypeFilter(self::EXTENSION_SASS, function($fileName) {
70 70
             return strpos($fileName, '.scss') !== false || strpos($fileName, '.sass') !== false;
71 71
         });
72 72
     }
Please login to merge, or discard this patch.
src/Brendt/Stitcher/Adapter/OrderAdapter.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
 
54 54
             $entries = $this->getData($page->getVariable($variable));
55 55
 
56
-            uasort($entries, function ($a, $b) use ($field) {
56
+            uasort($entries, function($a, $b) use ($field) {
57 57
                 return strcmp($a[$field], $b[$field]);
58 58
             });
59 59
 
Please login to merge, or discard this patch.
src/Brendt/Stitcher/Factory/AdapterFactory.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,23 +29,23 @@
 block discarded – undo
29 29
     public function __construct(ContainerInterface $container) {
30 30
         $this->container = $container;
31 31
 
32
-        $this->addAdapter(self::COLLECTION_ADAPTER, function () {
32
+        $this->addAdapter(self::COLLECTION_ADAPTER, function() {
33 33
             return $this->container->get('adapter.collection');
34 34
         });
35 35
 
36
-        $this->addAdapter(self::PAGINATION_ADAPTER, function () {
36
+        $this->addAdapter(self::PAGINATION_ADAPTER, function() {
37 37
             return $this->container->get('adapter.pagination');
38 38
         });
39 39
 
40
-        $this->addAdapter(self::ORDER_ADAPTER, function () {
40
+        $this->addAdapter(self::ORDER_ADAPTER, function() {
41 41
             return $this->container->get('adapter.order');
42 42
         });
43 43
 
44
-        $this->addAdapter(self::FILTER_ADAPTER, function () {
44
+        $this->addAdapter(self::FILTER_ADAPTER, function() {
45 45
             return $this->container->get('adapter.filter');
46 46
         });
47 47
 
48
-        $this->addAdapter(self::LIMIT_ADAPTER, function () {
48
+        $this->addAdapter(self::LIMIT_ADAPTER, function() {
49 49
             return $this->container->get('adapter.limit');
50 50
         });
51 51
     }
Please login to merge, or discard this patch.
src/Pageon/Pcntl/PageRenderProcess.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -52,6 +52,9 @@
 block discarded – undo
52 52
         $this->async = $async;
53 53
     }
54 54
 
55
+    /**
56
+     * @param string $environment
57
+     */
55 58
     public function setEnvironment($environment) {
56 59
         $this->environment = $environment;
57 60
     }
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -2,11 +2,9 @@
 block discarded – undo
2 2
 
3 3
 namespace Pageon\Pcntl;
4 4
 
5
-use Brendt\Stitcher\App;
6 5
 use Brendt\Stitcher\Application\DevController;
7 6
 use Brendt\Stitcher\Parser\Site\PageParser;
8 7
 use Brendt\Stitcher\Site\Page;
9
-use Brendt\Stitcher\Site\Seo\SiteMap;
10 8
 use Symfony\Component\Filesystem\Filesystem;
11 9
 
12 10
 class PageRenderProcess extends Process
Please login to merge, or discard this patch.
src/Brendt/Stitcher/Parser/Site/SiteParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -214,7 +214,7 @@
 block discarded – undo
214 214
         $pageRenderProcess = new PageRenderProcess($this->pageParser, $page, $this->publicDir, $filterValue);
215 215
         $pageRenderProcess->setEnvironment($this->environment);
216 216
         
217
-        $pageRenderProcess->onSuccess(function ($pageIds) use ($page) {
217
+        $pageRenderProcess->onSuccess(function($pageIds) use ($page) {
218 218
             if ($this->siteMap->isEnabled()) {
219 219
                 foreach ($pageIds as $pageId) {
220 220
                     $this->siteMap->addPath($pageId);
Please login to merge, or discard this patch.
src/Brendt/Stitcher/Parser/Site/PageParser.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@
 block discarded – undo
7 7
 use Brendt\Stitcher\Factory\HeaderCompilerFactory;
8 8
 use Brendt\Stitcher\Factory\ParserFactory;
9 9
 use Brendt\Stitcher\Factory\TemplateEngineFactory;
10
-use Brendt\Stitcher\Site\Http\HeaderCompiler;
11 10
 use Brendt\Stitcher\Site\Meta\MetaCompiler;
12 11
 use Brendt\Stitcher\Site\Page;
13 12
 use Brendt\Stitcher\Template\TemplatePlugin;
Please login to merge, or discard this patch.
src/Brendt/Stitcher/Site/Http/Htaccess.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace Brendt\Stitcher\Site\Http;
4 4
 
5
-use Brendt\Stitcher\Exception\ConfigurationException;
6 5
 use Brendt\Stitcher\Site\Page;
7 6
 use Symfony\Component\Filesystem\Filesystem;
8 7
 use Tivie\HtaccessParser\HtaccessContainer;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -209,7 +209,7 @@
 block discarded – undo
209 209
         $this->createConditionalRewrite($rewriteBlock, '%{DOCUMENT_ROOT}/$1.html -f', '^(.+?)/?$ /$1.html [L]');
210 210
     }
211 211
 
212
-    private function createConditionalRewrite(Block &$rewriteBlock, string $condition, string $rule) {
212
+    private function createConditionalRewrite(Block & $rewriteBlock, string $condition, string $rule) {
213 213
         $rewriteBlock->addLineBreak(1);
214 214
 
215 215
         $conditionLine = new Directive();
Please login to merge, or discard this patch.
src/Brendt/Stitcher/Site/Meta/MetaCompiler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
         $this->addCompiler('_name', [$this, 'compileNamedMeta']);
25 25
     }
26 26
 
27
-    public function setDefaultMeta(Meta &$meta) {
27
+    public function setDefaultMeta(Meta & $meta) {
28 28
         foreach ($this->metaConfig as $name => $value) {
29 29
             $meta->name($name, $value);
30 30
         }
Please login to merge, or discard this patch.