@@ -15,7 +15,7 @@ |
||
| 15 | 15 | /** |
| 16 | 16 | * Returns a list of filters. |
| 17 | 17 | * |
| 18 | - * @return array |
|
| 18 | + * @return Twig_SimpleFilter[] |
|
| 19 | 19 | */ |
| 20 | 20 | public function getFilters() |
| 21 | 21 | { |
@@ -64,7 +64,9 @@ discard block |
||
| 64 | 64 | */ |
| 65 | 65 | public function parseDataItems ($folders) |
| 66 | 66 | { |
| 67 | - if ($folders === null) { return; } |
|
| 67 | + if ($folders === null) |
|
| 68 | + { |
|
| 69 | +return; } |
|
| 68 | 70 | |
| 69 | 71 | foreach ($folders as $folder) |
| 70 | 72 | { |
@@ -84,7 +86,9 @@ discard block |
||
| 84 | 86 | */ |
| 85 | 87 | public function parseDataSets ($dataSets) |
| 86 | 88 | { |
| 87 | - if ($dataSets === null) { return; } |
|
| 89 | + if ($dataSets === null) |
|
| 90 | + { |
|
| 91 | +return; } |
|
| 88 | 92 | |
| 89 | 93 | /** |
| 90 | 94 | * The information which each DataSet has from the configuration file |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | /** |
| 33 | 33 | * Get all of the DataItems and DataSets in this manager |
| 34 | 34 | * |
| 35 | - * @return array |
|
| 35 | + * @return string |
|
| 36 | 36 | */ |
| 37 | 37 | public function getDataItems () |
| 38 | 38 | { |
@@ -25,7 +25,9 @@ |
||
| 25 | 25 | $highlighted = $this->highlighter->highlight($language, $block['element']['text']['text']); |
| 26 | 26 | $block['element']['text']['text'] = $highlighted->value; |
| 27 | 27 | } |
| 28 | - catch (\DomainException $exception) {} |
|
| 28 | + catch (\DomainException $exception) |
|
| 29 | + { |
|
| 30 | +} |
|
| 29 | 31 | } |
| 30 | 32 | |
| 31 | 33 | return $block; |
@@ -177,10 +177,13 @@ |
||
| 177 | 177 | break; |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | - if (!is_null($pd)) // No parser needed |
|
| 180 | + if (!is_null($pd)) |
|
| 181 | + { |
|
| 182 | + // No parser needed |
|
| 181 | 183 | { |
| 182 | 184 | $this->bodyContent = $pd->parse($this->bodyContent); |
| 183 | 185 | } |
| 186 | + } |
|
| 184 | 187 | |
| 185 | 188 | $this->bodyContentEvaluated = true; |
| 186 | 189 | } |
@@ -76,7 +76,9 @@ |
||
| 76 | 76 | while (false !== $entry = $dir->read()) |
| 77 | 77 | { |
| 78 | 78 | // Skip pointers |
| 79 | - if ($entry == '.' || $entry == '..') { continue; } |
|
| 79 | + if ($entry == '.' || $entry == '..') |
|
| 80 | + { |
|
| 81 | +continue; } |
|
| 80 | 82 | |
| 81 | 83 | $this->copy("$originFile/$entry", "$targetFile/$entry", true); |
| 82 | 84 | } |
@@ -56,6 +56,9 @@ |
||
| 56 | 56 | $this->staticPageViews = array(); |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | + /** |
|
| 60 | + * @param \allejo\stakx\Object\Configuration $configuration |
|
| 61 | + */ |
|
| 59 | 62 | public function configureTwig ($configuration, $options) |
| 60 | 63 | { |
| 61 | 64 | $twig = new TwigManager(); |
@@ -67,7 +67,9 @@ discard block |
||
| 67 | 67 | |
| 68 | 68 | public function setCollections (&$collections) |
| 69 | 69 | { |
| 70 | - if (empty($collections)) { return; } |
|
| 70 | + if (empty($collections)) |
|
| 71 | + { |
|
| 72 | +return; } |
|
| 71 | 73 | |
| 72 | 74 | $this->collections = &$collections; |
| 73 | 75 | } |
@@ -122,7 +124,9 @@ discard block |
||
| 122 | 124 | */ |
| 123 | 125 | public function parsePageViews ($pageViewFolders) |
| 124 | 126 | { |
| 125 | - if (empty($pageViewFolders)) { return; } |
|
| 127 | + if (empty($pageViewFolders)) |
|
| 128 | + { |
|
| 129 | +return; } |
|
| 126 | 130 | |
| 127 | 131 | /** |
| 128 | 132 | * The name of the folder where PageViews are located |
@@ -525,7 +529,9 @@ discard block |
||
| 525 | 529 | */ |
| 526 | 530 | private function trackParentTwigTemplate ($template, &$pageView) |
| 527 | 531 | { |
| 528 | - if (!$this->tracking) { return; } |
|
| 532 | + if (!$this->tracking) |
|
| 533 | + { |
|
| 534 | +return; } |
|
| 529 | 535 | |
| 530 | 536 | /** @var Twig_Template $parent */ |
| 531 | 537 | $parent = $template->getParent(array()); |
@@ -37,7 +37,9 @@ |
||
| 37 | 37 | */ |
| 38 | 38 | protected function copyToCompiledSite ($file, $prefix = "") |
| 39 | 39 | { |
| 40 | - if (!$this->fs->exists($file)) { return; } |
|
| 40 | + if (!$this->fs->exists($file)) |
|
| 41 | + { |
|
| 42 | +return; } |
|
| 41 | 43 | |
| 42 | 44 | $filePath = $file->getRealPath(); |
| 43 | 45 | $pathToStrip = $this->fs->appendPath(getcwd(), $prefix); |
@@ -93,7 +93,8 @@ discard block |
||
| 93 | 93 | */ |
| 94 | 94 | public function log ($level, $message, array $context = array()) |
| 95 | 95 | { |
| 96 | - if (!isset($this->verbosityLevelMap[$level])) { |
|
| 96 | + if (!isset($this->verbosityLevelMap[$level])) |
|
| 97 | + { |
|
| 97 | 98 | throw new InvalidArgumentException(sprintf('The log level "%s" does not exist.', $level)); |
| 98 | 99 | } |
| 99 | 100 | |
@@ -144,8 +145,10 @@ discard block |
||
| 144 | 145 | { |
| 145 | 146 | // build a replacement array with braces around the context keys |
| 146 | 147 | $replace = array(); |
| 147 | - foreach ($context as $key => $val) { |
|
| 148 | - if (!is_array($val) && (!is_object($val) || method_exists($val, '__toString'))) { |
|
| 148 | + foreach ($context as $key => $val) |
|
| 149 | + { |
|
| 150 | + if (!is_array($val) && (!is_object($val) || method_exists($val, '__toString'))) |
|
| 151 | + { |
|
| 149 | 152 | $replace[sprintf('{%s}', $key)] = $val; |
| 150 | 153 | } |
| 151 | 154 | } |
@@ -305,11 +305,17 @@ |
||
| 305 | 305 | $this->noClean = $noClean; |
| 306 | 306 | } |
| 307 | 307 | |
| 308 | + /** |
|
| 309 | + * @param string $filePath |
|
| 310 | + */ |
|
| 308 | 311 | private function creationWatcher ($filePath) |
| 309 | 312 | { |
| 310 | 313 | $this->output->writeln(sprintf("File creation detected: %s", $filePath)); |
| 311 | 314 | } |
| 312 | 315 | |
| 316 | + /** |
|
| 317 | + * @param string $filePath |
|
| 318 | + */ |
|
| 313 | 319 | private function modificationWatcher ($filePath) |
| 314 | 320 | { |
| 315 | 321 | $this->output->writeln(sprintf("File change detected: %s", $filePath)); |