| @@ -63,8 +63,8 @@ | ||
| 63 | 63 | * FileExplorer constructor. | 
| 64 | 64 | * | 
| 65 | 65 | * @param \RecursiveIterator $iterator | 
| 66 | - * @param array $excludes | |
| 67 | - * @param array $includes | |
| 66 | + * @param string[] $excludes | |
| 67 | + * @param string[] $includes | |
| 68 | 68 | * @param int|null $flags | 
| 69 | 69 | */ | 
| 70 | 70 | public function __construct(\RecursiveIterator $iterator, array $excludes = array(), array $includes = array(), $flags = null) | 
| @@ -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 | } | 
| @@ -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 |      { | 
| @@ -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); | 
| @@ -9,6 +9,9 @@ | ||
| 9 | 9 | |
| 10 | 10 | class PlainTextEngine implements ParsingEngine | 
| 11 | 11 |  { | 
| 12 | + /** | |
| 13 | + * @param string $context | |
| 14 | + */ | |
| 12 | 15 | public function parse($context) | 
| 13 | 16 |      { | 
| 14 | 17 | return $context; | 
| @@ -14,6 +14,9 @@ | ||
| 14 | 14 | */ | 
| 15 | 15 | private static $fs; | 
| 16 | 16 | |
| 17 | + /** | |
| 18 | + * @param string $fileName | |
| 19 | + */ | |
| 17 | 20 | public static function getResource($fileName) | 
| 18 | 21 |      { | 
| 19 | 22 | self::initFileSystem(); | 
| @@ -89,7 +89,7 @@ discard block | ||
| 89 | 89 | * @param array|\ArrayAccess[] $array The elements to filter through | 
| 90 | 90 | * @param string $key The key value in an associative array or FrontMatter | 
| 91 | 91 | * @param string $comparison The actual comparison symbols being used | 
| 92 | - * @param mixed $value The value we're searching for | |
| 92 | + * @param string $value The value we're searching for | |
| 93 | 93 | * | 
| 94 | 94 | * @throws Twig_Error_Syntax | 
| 95 | 95 | * | 
| @@ -147,6 +147,9 @@ discard block | ||
| 147 | 147 | return false; | 
| 148 | 148 | } | 
| 149 | 149 | |
| 150 | + /** | |
| 151 | + * @param string $comparison | |
| 152 | + */ | |
| 150 | 153 | private function comparisonSymbol($lhs, $comparison, $rhs) | 
| 151 | 154 |      { | 
| 152 | 155 | switch ($comparison) | 
| @@ -22,6 +22,9 @@ | ||
| 22 | 22 | return false; | 
| 23 | 23 | } | 
| 24 | 24 | |
| 25 | + /** | |
| 26 | + * @param string $keyField | |
| 27 | + */ | |
| 25 | 28 | public static function array_merge_defaults(array &$array1, array &$array2, $keyField) | 
| 26 | 29 |      { | 
| 27 | 30 | $merged = $array1; | 
| @@ -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 |      { |