@@ -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 |
@@ -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; |
@@ -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 | |
@@ -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 | } |
@@ -84,13 +84,13 @@ discard block |
||
| 84 | 84 | $this->bodyContentEvaluated = true; |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - return (string)$this->bodyContent; |
|
| 87 | + return (string) $this->bodyContent; |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | /** |
| 91 | 91 | * @return PageView |
| 92 | 92 | */ |
| 93 | - public function &getPageView () |
|
| 93 | + public function &getPageView() |
|
| 94 | 94 | { |
| 95 | 95 | return $this->parentPageView; |
| 96 | 96 | } |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | /** |
| 114 | 114 | * {@inheritdoc} |
| 115 | 115 | */ |
| 116 | - public function jsonSerialize() |
|
| 116 | + public function jsonSerialize () |
|
| 117 | 117 | { |
| 118 | 118 | return array_merge($this->getFrontMatter(), array( |
| 119 | 119 | 'content' => $this->getContent() |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | public function getFilters () |
| 21 | 21 | { |
| 22 | 22 | return array( |
| 23 | - new Twig_SimpleFilter('summary', 'twig_summary_filter'), |
|
| 23 | + new Twig_SimpleFilter('summary', 'twig_summary_filter'), |
|
| 24 | 24 | new Twig_SimpleFilter('truncate', 'twig_truncate_filter', array('needs_environment' => true)), |
| 25 | 25 | new Twig_SimpleFilter('wordwrap', 'twig_wordwrap_filter', array('needs_environment' => true)), |
| 26 | 26 | ); |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | $length = $breakpoint; |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | - return rtrim(mb_substr($value, 0, $length, $env->getCharset())).$separator; |
|
| 76 | + return rtrim(mb_substr($value, 0, $length, $env->getCharset())) . $separator; |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | return $value; |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | * @throws FileNotFoundException When originFile doesn't exist |
| 63 | 63 | * @throws IOException When copy fails |
| 64 | 64 | */ |
| 65 | - public function copy($originFile, $targetFile, $overwriteNewerFiles = false) |
|
| 65 | + public function copy ($originFile, $targetFile, $overwriteNewerFiles = false) |
|
| 66 | 66 | { |
| 67 | 67 | if ($this->isDir($originFile)) |
| 68 | 68 | { |
@@ -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 | } |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | private static $twig; |
| 19 | 19 | |
| 20 | - public static function &getInstance () |
|
| 20 | + public static function &getInstance() |
|
| 21 | 21 | { |
| 22 | 22 | return self::$twig; |
| 23 | 23 | } |
@@ -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); |
@@ -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 | { |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | /** |
| 29 | 29 | * {@inheritdoc} |
| 30 | 30 | */ |
| 31 | - public function setLogger(LoggerInterface $logger) |
|
| 31 | + public function setLogger (LoggerInterface $logger) |
|
| 32 | 32 | { |
| 33 | 33 | $this->output = $logger; |
| 34 | 34 | } |
@@ -140,7 +140,7 @@ |
||
| 140 | 140 | * |
| 141 | 141 | * @return string |
| 142 | 142 | */ |
| 143 | - private function interpolate($message, array $context) |
|
| 143 | + private function interpolate ($message, array $context) |
|
| 144 | 144 | { |
| 145 | 145 | // build a replacement array with braces around the context keys |
| 146 | 146 | $replace = array(); |
@@ -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 | } |