@@ -741,7 +741,7 @@ |
||
| 741 | 741 | * @see <http://symfony.com/doc/current/components/yaml/introduction.html> |
| 742 | 742 | * @param string $rawContent the raw file contents |
| 743 | 743 | * @param string[] $headers known meta headers |
| 744 | - * @return array parsed meta data |
|
| 744 | + * @return string parsed meta data |
|
| 745 | 745 | */ |
| 746 | 746 | public function parseFileMeta($rawContent, array $headers) |
| 747 | 747 | { |
@@ -998,7 +998,7 @@ discard block |
||
| 998 | 998 | { |
| 999 | 999 | // sort pages |
| 1000 | 1000 | $order = $this->getConfig('pages_order'); |
| 1001 | - $alphaSortClosure = function ($a, $b) use ($order) { |
|
| 1001 | + $alphaSortClosure = function($a, $b) use ($order) { |
|
| 1002 | 1002 | $aSortKey = (basename($a['id']) === 'index') ? dirname($a['id']) : $a['id']; |
| 1003 | 1003 | $bSortKey = (basename($b['id']) === 'index') ? dirname($b['id']) : $b['id']; |
| 1004 | 1004 | |
@@ -1008,7 +1008,7 @@ discard block |
||
| 1008 | 1008 | |
| 1009 | 1009 | if ($this->getConfig('pages_order_by') === 'date') { |
| 1010 | 1010 | // sort by date |
| 1011 | - uasort($this->pages, function ($a, $b) use ($alphaSortClosure, $order) { |
|
| 1011 | + uasort($this->pages, function($a, $b) use ($alphaSortClosure, $order) { |
|
| 1012 | 1012 | if (empty($a['time']) || empty($b['time'])) { |
| 1013 | 1013 | $cmp = (empty($a['time']) - empty($b['time'])); |
| 1014 | 1014 | } else { |
@@ -1137,7 +1137,7 @@ discard block |
||
| 1137 | 1137 | // this is the reason why we can't register this filter as part of PicoTwigExtension |
| 1138 | 1138 | $pico = $this; |
| 1139 | 1139 | $pages = &$this->pages; |
| 1140 | - $this->twig->addFilter(new Twig_SimpleFilter('content', function ($page) use ($pico, &$pages) { |
|
| 1140 | + $this->twig->addFilter(new Twig_SimpleFilter('content', function($page) use ($pico, &$pages) { |
|
| 1141 | 1141 | if (isset($pages[$page])) { |
| 1142 | 1142 | $pageData = &$pages[$page]; |
| 1143 | 1143 | if (!isset($pageData['content'])) { |
@@ -295,7 +295,7 @@ |
||
| 295 | 295 | * @param string &$templateName file name of the template |
| 296 | 296 | * @return void |
| 297 | 297 | */ |
| 298 | - public function onPageRendering(Twig_Environment &$twig, array &$twigVariables, &$templateName) |
|
| 298 | + public function onPageRendering(Twig_Environment & $twig, array &$twigVariables, &$templateName) |
|
| 299 | 299 | { |
| 300 | 300 | // your code |
| 301 | 301 | } |
@@ -295,7 +295,7 @@ |
||
| 295 | 295 | * @param string &$templateName file name of the template |
| 296 | 296 | * @return void |
| 297 | 297 | */ |
| 298 | - public function onPageRendering(Twig_Environment &$twig, array &$twigVariables, &$templateName) |
|
| 298 | + public function onPageRendering(Twig_Environment & $twig, array &$twigVariables, &$templateName) |
|
| 299 | 299 | { |
| 300 | 300 | // your code |
| 301 | 301 | } |
@@ -6,10 +6,10 @@ discard block |
||
| 6 | 6 | } |
| 7 | 7 | |
| 8 | 8 | // load dependencies |
| 9 | -if(is_file(__DIR__ . '/vendor/autoload.php')) { |
|
| 9 | +if (is_file(__DIR__ . '/vendor/autoload.php')) { |
|
| 10 | 10 | // composer root package |
| 11 | 11 | require_once(__DIR__ . '/vendor/autoload.php'); |
| 12 | -} elseif(is_file(__DIR__ . '/../../../vendor/autoload.php')) { |
|
| 12 | +} elseif (is_file(__DIR__ . '/../../../vendor/autoload.php')) { |
|
| 13 | 13 | // composer dependency package |
| 14 | 14 | require_once(__DIR__ . '/../../../vendor/autoload.php'); |
| 15 | 15 | } else { |
@@ -18,8 +18,8 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | // instance Pico |
| 20 | 20 | $pico = new Pico( |
| 21 | - __DIR__, // root dir |
|
| 22 | - 'config/', // config dir |
|
| 21 | + __DIR__, // root dir |
|
| 22 | + 'config/', // config dir |
|
| 23 | 23 | 'plugins/', // plugins dir |
| 24 | 24 | 'themes/' // themes dir |
| 25 | 25 | ); |
@@ -155,7 +155,7 @@ |
||
| 155 | 155 | |
| 156 | 156 | $twigExtension = $this; |
| 157 | 157 | $varKeys = array_keys($var); |
| 158 | - uksort($var, function ($a, $b) use ($twigExtension, $var, $varKeys, $sortKeyPath, $fallback, &$removeItems) { |
|
| 158 | + uksort($var, function($a, $b) use ($twigExtension, $var, $varKeys, $sortKeyPath, $fallback, &$removeItems) { |
|
| 159 | 159 | $aSortValue = $twigExtension->getKeyOfVar($var[$a], $sortKeyPath); |
| 160 | 160 | $aSortValueNull = ($aSortValue === null); |
| 161 | 161 | |