@@ -392,7 +392,9 @@ |
||
| 392 | 392 | */ |
| 393 | 393 | final public function deleteFrontMatter ($key) |
| 394 | 394 | { |
| 395 | - if (!isset($this->writableFrontMatter[$key])) { return; } |
|
| 395 | + if (!isset($this->writableFrontMatter[$key])) |
|
| 396 | + { |
|
| 397 | +return; } |
|
| 396 | 398 | |
| 397 | 399 | unset($this->writableFrontMatter[$key]); |
| 398 | 400 | } |
@@ -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; |
@@ -143,11 +143,17 @@ discard block |
||
| 143 | 143 | */ |
| 144 | 144 | public function matchesPattern ($filePath) |
| 145 | 145 | { |
| 146 | - if ($this->strpos_array($filePath, $this->includes)) { return true; } |
|
| 147 | - if (($this->flags & self::INCLUDE_ONLY_FILES) && !$this->current()->isDir()) { return false; } |
|
| 146 | + if ($this->strpos_array($filePath, $this->includes)) |
|
| 147 | + { |
|
| 148 | +return true; } |
|
| 149 | + if (($this->flags & self::INCLUDE_ONLY_FILES) && !$this->current()->isDir()) |
|
| 150 | + { |
|
| 151 | +return false; } |
|
| 148 | 152 | |
| 149 | 153 | if (!($this->flags & self::ALLOW_DOT_FILES) && |
| 150 | - preg_match('#(^|\\\\|\/)\..+(\\\\|\/|$)#', $filePath) === 1) { return false; } |
|
| 154 | + preg_match('#(^|\\\\|\/)\..+(\\\\|\/|$)#', $filePath) === 1) |
|
| 155 | + { |
|
| 156 | +return false; } |
|
| 151 | 157 | |
| 152 | 158 | return ($this->strpos_array($filePath, $this->excludes) === false); |
| 153 | 159 | } |
@@ -192,10 +198,13 @@ discard block |
||
| 192 | 198 | return true; |
| 193 | 199 | } |
| 194 | 200 | |
| 195 | - if (strpos($haystack, $query, $offset) !== false) // stop on first true result |
|
| 201 | + if (strpos($haystack, $query, $offset) !== false) |
|
| 202 | + { |
|
| 203 | + // stop on first true result |
|
| 196 | 204 | { |
| 197 | 205 | return true; |
| 198 | 206 | } |
| 207 | + } |
|
| 199 | 208 | } |
| 200 | 209 | |
| 201 | 210 | return false; |
@@ -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 | } |
@@ -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 | } |
@@ -10,7 +10,9 @@ |
||
| 10 | 10 | |
| 11 | 11 | foreach ($array as $key => $item) |
| 12 | 12 | { |
| 13 | - if (!isset($item[$sortKey])) { continue; } |
|
| 13 | + if (!isset($item[$sortKey])) |
|
| 14 | + { |
|
| 15 | +continue; } |
|
| 14 | 16 | |
| 15 | 17 | $groupBy = $item[$sortKey]; |
| 16 | 18 | |
@@ -136,8 +136,12 @@ |
||
| 136 | 136 | |
| 137 | 137 | if ($array->coreInstanceOf(FrontMatterObject::class) && !isset($array[$key])) |
| 138 | 138 | { |
| 139 | - if ($comparison == '==' && is_null($value)) { return true; } |
|
| 140 | - if ($comparison == '!=' && !is_null($value)) { return true; } |
|
| 139 | + if ($comparison == '==' && is_null($value)) |
|
| 140 | + { |
|
| 141 | +return true; } |
|
| 142 | + if ($comparison == '!=' && !is_null($value)) |
|
| 143 | + { |
|
| 144 | +return true; } |
|
| 141 | 145 | } |
| 142 | 146 | |
| 143 | 147 | return false; |
@@ -161,7 +161,9 @@ discard block |
||
| 161 | 161 | */ |
| 162 | 162 | public function parsePageViews ($pageViewFolders) |
| 163 | 163 | { |
| 164 | - if (empty($pageViewFolders)) { return; } |
|
| 164 | + if (empty($pageViewFolders)) |
|
| 165 | + { |
|
| 166 | +return; } |
|
| 165 | 167 | |
| 166 | 168 | /** |
| 167 | 169 | * The name of the folder where PageViews are located |
@@ -343,7 +345,9 @@ discard block |
||
| 343 | 345 | */ |
| 344 | 346 | private function handleTrackableStaticPageView ($pageView) |
| 345 | 347 | { |
| 346 | - if (empty($pageView['title'])) { return; } |
|
| 348 | + if (empty($pageView['title'])) |
|
| 349 | + { |
|
| 350 | +return; } |
|
| 347 | 351 | |
| 348 | 352 | $this->addToSiteMenu($pageView); |
| 349 | 353 | $this->flatPages[$pageView['title']] = $pageView->createJail(); |
@@ -611,7 +615,9 @@ discard block |
||
| 611 | 615 | */ |
| 612 | 616 | private function trackParentTwigTemplate ($template, &$pageView) |
| 613 | 617 | { |
| 614 | - if (!$this->tracking) { return; } |
|
| 618 | + if (!$this->tracking) |
|
| 619 | + { |
|
| 620 | +return; } |
|
| 615 | 621 | |
| 616 | 622 | /** @var Twig_Template $parent */ |
| 617 | 623 | $parent = $template->getParent(array()); |
@@ -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 |