@@ -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 | } |
@@ -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 |
@@ -52,6 +52,9 @@ |
||
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 | } |
@@ -157,7 +157,7 @@ |
||
157 | 157 | $pageRenderProcess = new PageRenderProcess($this->pageParser, $page, $this->browser->getPublicDir(), $filterValue); |
158 | 158 | $pageRenderProcess->setEnvironment($this->environment); |
159 | 159 | |
160 | - $pageRenderProcess->onSuccess(function ($pageIds) use ($page) { |
|
160 | + $pageRenderProcess->onSuccess(function($pageIds) use ($page) { |
|
161 | 161 | if ($this->siteMap->isEnabled()) { |
162 | 162 | foreach ($pageIds as $pageId) { |
163 | 163 | $this->siteMap->addPath($pageId); |
@@ -21,23 +21,23 @@ |
||
21 | 21 | { |
22 | 22 | $this->container = $container; |
23 | 23 | |
24 | - $this->addAdapter(self::COLLECTION_ADAPTER, function () { |
|
24 | + $this->addAdapter(self::COLLECTION_ADAPTER, function() { |
|
25 | 25 | return $this->container->get('adapter.collection'); |
26 | 26 | }); |
27 | 27 | |
28 | - $this->addAdapter(self::PAGINATION_ADAPTER, function () { |
|
28 | + $this->addAdapter(self::PAGINATION_ADAPTER, function() { |
|
29 | 29 | return $this->container->get('adapter.pagination'); |
30 | 30 | }); |
31 | 31 | |
32 | - $this->addAdapter(self::ORDER_ADAPTER, function () { |
|
32 | + $this->addAdapter(self::ORDER_ADAPTER, function() { |
|
33 | 33 | return $this->container->get('adapter.order'); |
34 | 34 | }); |
35 | 35 | |
36 | - $this->addAdapter(self::FILTER_ADAPTER, function () { |
|
36 | + $this->addAdapter(self::FILTER_ADAPTER, function() { |
|
37 | 37 | return $this->container->get('adapter.filter'); |
38 | 38 | }); |
39 | 39 | |
40 | - $this->addAdapter(self::LIMIT_ADAPTER, function () { |
|
40 | + $this->addAdapter(self::LIMIT_ADAPTER, function() { |
|
41 | 41 | return $this->container->get('adapter.limit'); |
42 | 42 | }); |
43 | 43 | } |
@@ -28,35 +28,35 @@ |
||
28 | 28 | { |
29 | 29 | $this->container = $container; |
30 | 30 | |
31 | - self::addTypeFilter(self::EXTENSION_FOLDER, function ($fileName) { |
|
31 | + self::addTypeFilter(self::EXTENSION_FOLDER, function($fileName) { |
|
32 | 32 | return substr($fileName, -1) === '/'; |
33 | 33 | }); |
34 | 34 | |
35 | - self::addTypeFilter(self::EXTENSION_JSON, function ($fileName) { |
|
35 | + self::addTypeFilter(self::EXTENSION_JSON, function($fileName) { |
|
36 | 36 | return strpos($fileName, '.json') === strlen($fileName) - 5; |
37 | 37 | }); |
38 | 38 | |
39 | - self::addTypeFilter(self::EXTENSION_MD, function ($fileName) { |
|
39 | + self::addTypeFilter(self::EXTENSION_MD, function($fileName) { |
|
40 | 40 | return strpos($fileName, '.md') !== false; |
41 | 41 | }); |
42 | 42 | |
43 | - self::addTypeFilter(self::EXTENSION_YML, function ($fileName) { |
|
43 | + self::addTypeFilter(self::EXTENSION_YML, function($fileName) { |
|
44 | 44 | return strpos($fileName, '.yaml') !== false || strpos($fileName, '.yml') !== false; |
45 | 45 | }); |
46 | 46 | |
47 | - self::addTypeFilter(self::EXTENSION_IMG, function ($fileName) { |
|
47 | + self::addTypeFilter(self::EXTENSION_IMG, function($fileName) { |
|
48 | 48 | return strpos($fileName, '.jpg') !== false || strpos($fileName, '.png') !== false; |
49 | 49 | }); |
50 | 50 | |
51 | - self::addTypeFilter(self::EXTENSION_CSS, function ($fileName) { |
|
51 | + self::addTypeFilter(self::EXTENSION_CSS, function($fileName) { |
|
52 | 52 | return strpos($fileName, '.css') !== false; |
53 | 53 | }); |
54 | 54 | |
55 | - self::addTypeFilter(self::EXTENSION_JS, function ($fileName) { |
|
55 | + self::addTypeFilter(self::EXTENSION_JS, function($fileName) { |
|
56 | 56 | return strpos($fileName, '.js') === strlen($fileName) - 3; |
57 | 57 | }); |
58 | 58 | |
59 | - self::addTypeFilter(self::EXTENSION_SASS, function ($fileName) { |
|
59 | + self::addTypeFilter(self::EXTENSION_SASS, function($fileName) { |
|
60 | 60 | return strpos($fileName, '.scss') !== false || strpos($fileName, '.sass') !== false; |
61 | 61 | }); |
62 | 62 | } |
@@ -227,7 +227,7 @@ |
||
227 | 227 | $this->createConditionalRewrite($rewriteBlock, '%{DOCUMENT_ROOT}/$1.html -f', '^(.+?)/?$ /$1.html [L]'); |
228 | 228 | } |
229 | 229 | |
230 | - private function createConditionalRewrite(Block &$rewriteBlock, string $condition, string $rule) |
|
230 | + private function createConditionalRewrite(Block & $rewriteBlock, string $condition, string $rule) |
|
231 | 231 | { |
232 | 232 | $rewriteBlock->addLineBreak(1); |
233 | 233 |
@@ -25,7 +25,7 @@ |
||
25 | 25 | $this->addCompiler('_name', [$this, 'compileNamedMeta']); |
26 | 26 | } |
27 | 27 | |
28 | - public function setDefaultMeta(Meta &$meta) |
|
28 | + public function setDefaultMeta(Meta & $meta) |
|
29 | 29 | { |
30 | 30 | foreach ($this->metaConfig as $name => $value) { |
31 | 31 | $meta->name($name, $value); |