@@ -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 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | |
25 | 25 | if (!$this->fs->exists($this->themeFolder)) |
26 | 26 | { |
27 | - throw new FileNotFoundException("The '${themeName}' theme folder could not be found.'"); |
|
27 | + throw new FileNotFoundException("The '${themename}' theme folder could not be found.'"); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | if ($this->fs->exists($this->themeFile)) |
@@ -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; |
@@ -78,10 +78,10 @@ |
||
78 | 78 | */ |
79 | 79 | public static function associative_array_split($key, array &$array, $considerOffset = true) |
80 | 80 | { |
81 | - $offset = array_search($key, array_keys($array)) + (int)$considerOffset; |
|
81 | + $offset = array_search($key, array_keys($array)) + (int) $considerOffset; |
|
82 | 82 | $result = array(); |
83 | 83 | |
84 | - $result[0] = array_slice($array, 0 , $offset, true); |
|
84 | + $result[0] = array_slice($array, 0, $offset, true); |
|
85 | 85 | $result[1] = array_slice($array, $offset, null, true); |
86 | 86 | |
87 | 87 | return $result; |