@@ -104,6 +104,9 @@ |
||
| 104 | 104 | } |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | + /** |
|
| 108 | + * @param string $dst |
|
| 109 | + */ |
|
| 107 | 110 | protected function copyFolder($src, $dst) { |
| 108 | 111 | $finder = new Finder(); |
| 109 | 112 | $srcFiles = $finder->files()->in($src)->ignoreDotFiles(false); |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Symfony\Component\Console\Command\Command; |
| 6 | 6 | use Symfony\Component\Console\Input\InputInterface; |
| 7 | -use Symfony\Component\Console\Input\InputOption; |
|
| 8 | 7 | use Symfony\Component\Console\Output\OutputInterface; |
| 9 | 8 | use Symfony\Component\Filesystem\Filesystem; |
| 10 | 9 | use Symfony\Component\Console\Question\Question; |
@@ -42,7 +42,7 @@ |
||
| 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 | } |
@@ -53,7 +53,7 @@ |
||
| 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 | |
@@ -3,7 +3,6 @@ |
||
| 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 | /** |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | * |
| 39 | 39 | * @return Parser|null |
| 40 | 40 | */ |
| 41 | - public function getByFileName($fileName) : ?Parser { |
|
| 41 | + public function getByFileName($fileName) : ? Parser { |
|
| 42 | 42 | if (!is_string($fileName)) { |
| 43 | 43 | return null; |
| 44 | 44 | } |
@@ -35,9 +35,9 @@ |
||
| 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 | } |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | $blanket = $stitcher->stitch($route); |
| 36 | 36 | $stitcher->save($blanket); |
| 37 | 37 | |
| 38 | - $stitcher->done(function () use ($route, $output) { |
|
| 38 | + $stitcher->done(function() use ($route, $output) { |
|
| 39 | 39 | $publicDir = Config::get('directories.public'); |
| 40 | 40 | |
| 41 | 41 | if ($route) { |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use Brendt\Stitcher\Config; |
| 6 | 6 | use Brendt\Stitcher\Stitcher; |
| 7 | 7 | use Symfony\Component\Console\Command\Command; |
| 8 | -use Symfony\Component\Console\Input\InputArgument; |
|
| 9 | 8 | use Symfony\Component\Console\Input\InputInterface; |
| 10 | 9 | use Symfony\Component\Console\Output\OutputInterface; |
| 11 | 10 | |
@@ -77,7 +77,7 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -17,7 +17,7 @@ |
||
| 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); |