Passed
Push — develop ( 1cf98b...63d0b7 )
by Brent
02:58
created
src/Adapter/FilterAdapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
             $entries = $this->getData($page->getVariable($variable));
43 43
 
44 44
             foreach ($filters as $field => $value) {
45
-                $entries = array_filter($entries, function ($entry) use ($field, $value) {
45
+                $entries = array_filter($entries, function($entry) use ($field, $value) {
46 46
                     return isset($entry[$field]) && $entry[$field] == $value;
47 47
                 });
48 48
             }
Please login to merge, or discard this patch.
src/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/Parser/ImageParser.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace Brendt\Stitcher\Parser;
4 4
 
5 5
 use Brendt\Image\ResponsiveFactory;
6
-use Brendt\Stitcher\Config;
7 6
 use Brendt\Stitcher\Stitcher;
8 7
 
9 8
 /**
Please login to merge, or discard this patch.
src/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/Stitcher.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      * @param string $publicDir
78 78
      * @param string $templateDir
79 79
      */
80
-    private function __construct(?string $srcDir = './src', ?string $publicDir = './public', ?string $templateDir = './src/template') {
80
+    private function __construct(? string $srcDir = './src', ? string $publicDir = './public', ? string $templateDir = './src/template') {
81 81
         $this->srcDir = $srcDir;
82 82
         $this->publicDir = $publicDir;
83 83
         $this->templateDir = $templateDir;
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
      *
389 389
      * @return Stitcher
390 390
      */
391
-    public function addPromise(?Promise $promise) : Stitcher {
391
+    public function addPromise(? Promise $promise) : Stitcher {
392 392
         if ($promise) {
393 393
             $this->promises[] = $promise;
394 394
         }
Please login to merge, or discard this patch.
src/Template/Smarty/SmartyEngine.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      * @param string $templateDir
18 18
      * @param string $cacheDir
19 19
      */
20
-    public function __construct(?string $templateDir = './src', ?string $cacheDir = './.cache') {
20
+    public function __construct(? string $templateDir = './src', ? string $cacheDir = './.cache') {
21 21
         parent::__construct();
22 22
 
23 23
         $this->addTemplateDir($templateDir);
Please login to merge, or discard this patch.
src/Command/InstallCommand.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -106,6 +106,9 @@
 block discarded – undo
106 106
         }
107 107
     }
108 108
 
109
+    /**
110
+     * @param string $dst
111
+     */
109 112
     protected function copyFolder($src, $dst) {
110 113
         $finder = new Finder();
111 114
         /** @var SplFileInfo[] $srcFiles */
Please login to merge, or discard this patch.
src/Command/GenerateCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
         $blanket = $stitcher->stitch($route);
33 33
         $stitcher->save($blanket);
34 34
 
35
-        $stitcher->done(function () use ($route, $output) {
35
+        $stitcher->done(function() use ($route, $output) {
36 36
             $publicDir = Stitcher::getParameter('directories.public');
37 37
 
38 38
             if ($route) {
Please login to merge, or discard this patch.
src/Factory/ParserFactory.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -35,35 +35,35 @@  discard block
 block discarded – undo
35 35
     public function __construct(ContainerInterface $container) {
36 36
         $this->container = $container;
37 37
 
38
-        self::addTypeFilter(self::EXTENSION_FOLDER, function ($fileName) {
38
+        self::addTypeFilter(self::EXTENSION_FOLDER, function($fileName) {
39 39
             return strpos($fileName, '/') === strlen($fileName) - 1;
40 40
         });
41 41
 
42
-        self::addTypeFilter(self::EXTENSION_JSON, function ($fileName) {
42
+        self::addTypeFilter(self::EXTENSION_JSON, function($fileName) {
43 43
             return strpos($fileName, '.json') === strlen($fileName) - 5;
44 44
         });
45 45
 
46
-        self::addTypeFilter(self::EXTENSION_MD, function ($fileName) {
46
+        self::addTypeFilter(self::EXTENSION_MD, function($fileName) {
47 47
             return strpos($fileName, '.md') !== false;
48 48
         });
49 49
 
50
-        self::addTypeFilter(self::EXTENSION_YML, function ($fileName) {
50
+        self::addTypeFilter(self::EXTENSION_YML, function($fileName) {
51 51
             return strpos($fileName, '.yaml') !== false || strpos($fileName, '.yml') !== false;
52 52
         });
53 53
 
54
-        self::addTypeFilter(self::EXTENSION_IMG, function ($fileName) {
54
+        self::addTypeFilter(self::EXTENSION_IMG, function($fileName) {
55 55
             return strpos($fileName, '.jpg') !== false || strpos($fileName, '.png') !== false;
56 56
         });
57 57
 
58
-        self::addTypeFilter(self::EXTENSION_CSS, function ($fileName) {
58
+        self::addTypeFilter(self::EXTENSION_CSS, function($fileName) {
59 59
             return strpos($fileName, '.css') !== false;
60 60
         });
61 61
 
62
-        self::addTypeFilter(self::EXTENSION_JS, function ($fileName) {
62
+        self::addTypeFilter(self::EXTENSION_JS, function($fileName) {
63 63
             return strpos($fileName, '.js') === strlen($fileName) - 3;
64 64
         });
65 65
 
66
-        self::addTypeFilter(self::EXTENSION_SASS, function ($fileName) {
66
+        self::addTypeFilter(self::EXTENSION_SASS, function($fileName) {
67 67
             return strpos($fileName, '.scss') !== false || strpos($fileName, '.sass') !== false;
68 68
         });
69 69
     }
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      *
82 82
      * @return Parser|null
83 83
      */
84
-    public function getByFileName($fileName) : ?Parser {
84
+    public function getByFileName($fileName) : ? Parser {
85 85
         if (!is_string($fileName)) {
86 86
             return null;
87 87
         }
Please login to merge, or discard this patch.