@@ -197,7 +197,7 @@ |
||
| 197 | 197 | * |
| 198 | 198 | * @param string $frontMatterKey The current hierarchy of the Front Matter keys being used |
| 199 | 199 | * @param string $expandableValue The Front Matter value that will be expanded |
| 200 | - * @param array $arrayVariableNames The Front Matter variable names that reference arrays |
|
| 200 | + * @param string[] $arrayVariableNames The Front Matter variable names that reference arrays |
|
| 201 | 201 | * |
| 202 | 202 | * @throws YamlUnsupportedVariableException If a multidimensional array is given for value expansion |
| 203 | 203 | * |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | /** |
| 98 | 98 | * @TODO 1.0.0 Remove support for 'base' in next major release; it has been replaced by 'baseurl' |
| 99 | 99 | * |
| 100 | - * @return mixed|null |
|
| 100 | + * @return string |
|
| 101 | 101 | */ |
| 102 | 102 | public function getBaseUrl() |
| 103 | 103 | { |
@@ -168,6 +168,9 @@ discard block |
||
| 168 | 168 | return $this->configuration['twig']['autoescape']; |
| 169 | 169 | } |
| 170 | 170 | |
| 171 | + /** |
|
| 172 | + * @return string|false |
|
| 173 | + */ |
|
| 171 | 174 | public function getRedirectTemplate() |
| 172 | 175 | { |
| 173 | 176 | return $this->configuration['templates']['redirect']; |
@@ -174,7 +174,7 @@ |
||
| 174 | 174 | /** |
| 175 | 175 | * Get the original file path. |
| 176 | 176 | * |
| 177 | - * @return string |
|
| 177 | + * @return SplFileInfo |
|
| 178 | 178 | */ |
| 179 | 179 | final public function getFilePath() |
| 180 | 180 | { |
@@ -349,6 +349,9 @@ discard block |
||
| 349 | 349 | $this->noClean = $noClean; |
| 350 | 350 | } |
| 351 | 351 | |
| 352 | + /** |
|
| 353 | + * @param string $filePath |
|
| 354 | + */ |
|
| 352 | 355 | private function creationWatcher($filePath) |
| 353 | 356 | { |
| 354 | 357 | $this->output->writeln(sprintf('File creation detected: %s', $filePath)); |
@@ -390,6 +393,9 @@ discard block |
||
| 390 | 393 | } |
| 391 | 394 | } |
| 392 | 395 | |
| 396 | + /** |
|
| 397 | + * @param string $filePath |
|
| 398 | + */ |
|
| 393 | 399 | private function modificationWatcher($filePath) |
| 394 | 400 | { |
| 395 | 401 | $this->output->writeln(sprintf('File change detected: %s', $filePath)); |
@@ -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 | { |
@@ -203,7 +203,8 @@ |
||
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | if (strpos($haystack, $query, $offset) !== false) |
| 206 | - { // stop on first true result |
|
| 206 | + { |
|
| 207 | +// stop on first true result |
|
| 207 | 208 | return true; |
| 208 | 209 | } |
| 209 | 210 | } |
@@ -18,7 +18,8 @@ |
||
| 18 | 18 | |
| 19 | 19 | public function filter($in, $out, &$consumed, $closing) |
| 20 | 20 | { |
| 21 | - while ($bucket = stream_bucket_make_writeable($in)) { |
|
| 21 | + while ($bucket = stream_bucket_make_writeable($in)) |
|
| 22 | + { |
|
| 22 | 23 | self::$output .= $bucket->data; |
| 23 | 24 | $consumed += $bucket->datalen; |
| 24 | 25 | } |
@@ -84,7 +84,8 @@ |
||
| 84 | 84 | { |
| 85 | 85 | $results = array(); |
| 86 | 86 | |
| 87 | - foreach ($elements as $element) { |
|
| 87 | + foreach ($elements as $element) |
|
| 88 | + { |
|
| 88 | 89 | $filename = (isset($element['filename'])) ? $element['filename'] : hash('sha256', uniqid(mt_rand(), true), false); |
| 89 | 90 | $frontMatter = (empty($element['frontmatter'])) ? '' : Yaml::dump($element['frontmatter'], 2); |
| 90 | 91 | $body = (isset($element['body'])) ? $element['body'] : 'Body Text'; |
@@ -50,6 +50,9 @@ |
||
| 50 | 50 | // Assertion functions |
| 51 | 51 | /// |
| 52 | 52 | |
| 53 | + /** |
|
| 54 | + * @param string $haystack |
|
| 55 | + */ |
|
| 53 | 56 | protected function assertStringContains($needle, $haystack, $message = '') |
| 54 | 57 | { |
| 55 | 58 | $this->assertNotFalse(strpos($haystack, $needle), $message); |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | * |
| 84 | 84 | * @since 0.1.1 |
| 85 | 85 | * |
| 86 | - * @return PageView[][] |
|
| 86 | + * @return PageView[] |
|
| 87 | 87 | */ |
| 88 | 88 | public function &getPageViews() |
| 89 | 89 | { |