@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | /** |
| 47 | 47 | * Copy all of the assets |
| 48 | 48 | */ |
| 49 | - public function copyFiles() |
|
| 49 | + public function copyFiles () |
|
| 50 | 50 | { |
| 51 | 51 | $this->scanTrackableItems( |
| 52 | 52 | getcwd(), |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | /** |
| 65 | 65 | * {@inheritdoc} |
| 66 | 66 | */ |
| 67 | - public function isHandled($filePath) |
|
| 67 | + public function isHandled ($filePath) |
|
| 68 | 68 | { |
| 69 | 69 | return $this->fileExplorer->matchesPattern($filePath); |
| 70 | 70 | } |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | /** |
| 73 | 73 | * {@inheritdoc} |
| 74 | 74 | */ |
| 75 | - public function createNewItem($filePath) |
|
| 75 | + public function createNewItem ($filePath) |
|
| 76 | 76 | { |
| 77 | 77 | return $this->handleTrackableItem($filePath, array( |
| 78 | 78 | 'prefix' => '' |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | /** |
| 83 | 83 | * {@inheritdoc} |
| 84 | 84 | */ |
| 85 | - protected function handleTrackableItem($file, $options = array()) |
|
| 85 | + protected function handleTrackableItem ($file, $options = array()) |
|
| 86 | 86 | { |
| 87 | 87 | if (is_string($file)) |
| 88 | 88 | { |
@@ -90,7 +90,9 @@ |
||
| 90 | 90 | $file = $this->fs->createSplFileInfo($file); |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | - if (!$this->fs->exists($file)) { return; } |
|
| 93 | + if (!$this->fs->exists($file)) |
|
| 94 | + { |
|
| 95 | +return; } |
|
| 94 | 96 | |
| 95 | 97 | $filePath = $file->getRealPath(); |
| 96 | 98 | $pathToStrip = $this->fs->appendPath(getcwd(), $options['prefix']); |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | /** |
| 41 | 41 | * {@inheritdoc} |
| 42 | 42 | */ |
| 43 | - public function __construct($filePath) |
|
| 43 | + public function __construct ($filePath) |
|
| 44 | 44 | { |
| 45 | 45 | parent::__construct($filePath); |
| 46 | 46 | |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | * |
| 87 | 87 | * @return PageView[] |
| 88 | 88 | */ |
| 89 | - public function &getChildren () |
|
| 89 | + public function &getChildren() |
|
| 90 | 90 | { |
| 91 | 91 | return $this->children; |
| 92 | 92 | } |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | self::$fileSys = new Filesystem(); |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | - $frontMatter = array( |
|
| 172 | + $frontMatter = array( |
|
| 173 | 173 | 'permalink' => $redirectFrom, |
| 174 | 174 | 'redirect' => $redirectTo, |
| 175 | 175 | 'menu' => false |
@@ -9,7 +9,9 @@ |
||
| 9 | 9 | foreach ($array as $element) |
| 10 | 10 | { |
| 11 | 11 | if (is_array($element)) |
| 12 | - return true; |
|
| 12 | + { |
|
| 13 | + return true; |
|
| 14 | + } |
|
| 13 | 15 | } |
| 14 | 16 | |
| 15 | 17 | return false; |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | * |
| 62 | 62 | * @param array $rawFrontMatter |
| 63 | 63 | */ |
| 64 | - public function __construct(&$rawFrontMatter) |
|
| 64 | + public function __construct (&$rawFrontMatter) |
|
| 65 | 65 | { |
| 66 | 66 | $this->expansionUsed = false; |
| 67 | 67 | $this->nestingLevel = 0; |
@@ -100,7 +100,9 @@ discard block |
||
| 100 | 100 | */ |
| 101 | 101 | private function handleDateField () |
| 102 | 102 | { |
| 103 | - if (!isset($this->frontMatter['date'])) { return; } |
|
| 103 | + if (!isset($this->frontMatter['date'])) |
|
| 104 | + { |
|
| 105 | +return; } |
|
| 104 | 106 | |
| 105 | 107 | $date = &$this->frontMatter['date']; |
| 106 | 108 | |
@@ -119,7 +121,9 @@ discard block |
||
| 119 | 121 | { |
| 120 | 122 | $itemDate = new \DateTime($date); |
| 121 | 123 | } |
| 122 | - catch (\Exception $e) { return; } |
|
| 124 | + catch (\Exception $e) |
|
| 125 | + { |
|
| 126 | +return; } |
|
| 123 | 127 | } |
| 124 | 128 | |
| 125 | 129 | if (!$itemDate === false) |
@@ -271,7 +275,9 @@ discard block |
||
| 271 | 275 | |
| 272 | 276 | if (is_array($value) || is_bool($value)) |
| 273 | 277 | { |
| 274 | - if ($ignoreArrays) { continue; } |
|
| 278 | + if ($ignoreArrays) |
|
| 279 | + { |
|
| 280 | +continue; } |
|
| 275 | 281 | |
| 276 | 282 | throw new YamlUnsupportedVariableException("Yaml variable `$variable` for `$key` is not a supported data type."); |
| 277 | 283 | } |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | /** |
| 20 | 20 | * {@inheritdoc} |
| 21 | 21 | */ |
| 22 | - public function __construct($filePath) |
|
| 22 | + public function __construct ($filePath) |
|
| 23 | 23 | { |
| 24 | 24 | parent::__construct($filePath); |
| 25 | 25 | |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | /** |
| 20 | 20 | * {@inheritdoc} |
| 21 | 21 | */ |
| 22 | - public function __construct($filePath) |
|
| 22 | + public function __construct ($filePath) |
|
| 23 | 23 | { |
| 24 | 24 | parent::__construct($filePath); |
| 25 | 25 | |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | $this->highlighter = new Highlighter(); |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | - protected function blockHeader($line) |
|
| 16 | + protected function blockHeader ($line) |
|
| 17 | 17 | { |
| 18 | 18 | $Block = parent::blockHeader($line); |
| 19 | 19 | |
@@ -44,7 +44,9 @@ |
||
| 44 | 44 | return $block; |
| 45 | 45 | } |
| 46 | 46 | // Exception thrown when language not supported, so just catch it and ignore it. |
| 47 | - catch (\DomainException $exception) {} |
|
| 47 | + catch (\DomainException $exception) |
|
| 48 | + { |
|
| 49 | +} |
|
| 48 | 50 | } |
| 49 | 51 | |
| 50 | 52 | return parent::blockFencedCodeComplete($block); |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | /** |
| 59 | 59 | * PageManager constructor |
| 60 | 60 | */ |
| 61 | - public function __construct() |
|
| 61 | + public function __construct () |
|
| 62 | 62 | { |
| 63 | 63 | parent::__construct(); |
| 64 | 64 | |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | /** |
| 229 | 229 | * {@inheritdoc} |
| 230 | 230 | */ |
| 231 | - public function isTracked($filePath) |
|
| 231 | + public function isTracked ($filePath) |
|
| 232 | 232 | { |
| 233 | 233 | return (parent::isTracked($filePath) || isset($this->twigExtendsDeps[$filePath])); |
| 234 | 234 | } |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | /** |
| 237 | 237 | * {@inheritdoc} |
| 238 | 238 | */ |
| 239 | - public function refreshItem($filePath) |
|
| 239 | + public function refreshItem ($filePath) |
|
| 240 | 240 | { |
| 241 | 241 | if (parent::isTracked($filePath)) |
| 242 | 242 | { |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | /** |
| 257 | 257 | * {@inheritdoc} |
| 258 | 258 | */ |
| 259 | - protected function handleTrackableItem($filePath, $options = array()) |
|
| 259 | + protected function handleTrackableItem ($filePath, $options = array()) |
|
| 260 | 260 | { |
| 261 | 261 | $pageView = PageView::create($filePath); |
| 262 | 262 | $namespace = $pageView->getType(); |
@@ -534,7 +534,7 @@ discard block |
||
| 534 | 534 | { |
| 535 | 535 | $filePath = $this->fs->getRelativePath($parent->getSourceContext()->getPath()); |
| 536 | 536 | |
| 537 | - $this->twigExtendsDeps[$filePath][(string)$pageView->getFilePath()] = &$pageView; |
|
| 537 | + $this->twigExtendsDeps[$filePath][(string) $pageView->getFilePath()] = &$pageView; |
|
| 538 | 538 | $parent = $parent->getParent(array()); |
| 539 | 539 | } |
| 540 | 540 | } |
@@ -72,7 +72,9 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | public function setCollections (&$collections) |
| 74 | 74 | { |
| 75 | - if (empty($collections)) { return; } |
|
| 75 | + if (empty($collections)) |
|
| 76 | + { |
|
| 77 | +return; } |
|
| 76 | 78 | |
| 77 | 79 | $this->collections = &$collections; |
| 78 | 80 | } |
@@ -123,7 +125,8 @@ discard block |
||
| 123 | 125 | { |
| 124 | 126 | static $jailedMenu = array(); |
| 125 | 127 | |
| 126 | - if (!empty($jailedMenu)) { |
|
| 128 | + if (!empty($jailedMenu)) |
|
| 129 | + { |
|
| 127 | 130 | return $jailedMenu; |
| 128 | 131 | } |
| 129 | 132 | |
@@ -143,7 +146,9 @@ discard block |
||
| 143 | 146 | */ |
| 144 | 147 | public function parsePageViews ($pageViewFolders) |
| 145 | 148 | { |
| 146 | - if (empty($pageViewFolders)) { return; } |
|
| 149 | + if (empty($pageViewFolders)) |
|
| 150 | + { |
|
| 151 | +return; } |
|
| 147 | 152 | |
| 148 | 153 | /** |
| 149 | 154 | * The name of the folder where PageViews are located |
@@ -303,7 +308,8 @@ discard block |
||
| 303 | 308 | { |
| 304 | 309 | $this->addToSiteMenu($pageView); |
| 305 | 310 | |
| 306 | - if (!empty($pageView->title)) { |
|
| 311 | + if (!empty($pageView->title)) |
|
| 312 | + { |
|
| 307 | 313 | $this->flatPages[$pageView->title] = $pageView->createJail(); |
| 308 | 314 | } |
| 309 | 315 | } |
@@ -550,7 +556,9 @@ discard block |
||
| 550 | 556 | */ |
| 551 | 557 | private function trackParentTwigTemplate ($template, &$pageView) |
| 552 | 558 | { |
| 553 | - if (!$this->tracking) { return; } |
|
| 559 | + if (!$this->tracking) |
|
| 560 | + { |
|
| 561 | +return; } |
|
| 554 | 562 | |
| 555 | 563 | /** @var Twig_Template $parent */ |
| 556 | 564 | $parent = $template->getParent(array()); |
@@ -90,6 +90,9 @@ |
||
| 90 | 90 | $this->targetDir = &$folder; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | + /** |
|
| 94 | + * @param \allejo\stakx\Object\Configuration $configuration |
|
| 95 | + */ |
|
| 93 | 96 | public function configureTwig ($configuration, $options) |
| 94 | 97 | { |
| 95 | 98 | $this->twigOpts['configuration'] = $configuration; |
@@ -10,10 +10,12 @@ |
||
| 10 | 10 | { |
| 11 | 11 | $globals = $env->getGlobals(); |
| 12 | 12 | |
| 13 | - if (is_array($assetPath) || ($assetPath instanceof \ArrayAccess)) { |
|
| 13 | + if (is_array($assetPath) || ($assetPath instanceof \ArrayAccess)) |
|
| 14 | + { |
|
| 14 | 15 | $assetPath = $assetPath['permalink']; |
| 15 | 16 | } |
| 16 | - else if (is_null($assetPath)) { |
|
| 17 | + else if (is_null($assetPath)) |
|
| 18 | + { |
|
| 17 | 19 | $assetPath = '/'; |
| 18 | 20 | } |
| 19 | 21 | |