@@ -18,7 +18,7 @@ |
||
18 | 18 | * @param Filter $node |
19 | 19 | * @param Compiler $compiler |
20 | 20 | * |
21 | - * @return mixed |
|
21 | + * @return string |
|
22 | 22 | */ |
23 | 23 | protected function getNodeString(Filter $node, Compiler $compiler = null) |
24 | 24 | { |
@@ -75,6 +75,7 @@ discard block |
||
75 | 75 | * is missing in the executor include whitelist. |
76 | 76 | * Returns false in any other case. |
77 | 77 | * |
78 | + * @param string $extension |
|
78 | 79 | * @return bool |
79 | 80 | */ |
80 | 81 | protected function whiteListNeeded($extension) |
@@ -125,6 +126,7 @@ discard block |
||
125 | 126 | * Throw a invalid argument exception if the option does not exists. |
126 | 127 | * |
127 | 128 | * @param string name |
129 | + * @param string $name |
|
128 | 130 | * |
129 | 131 | * @throws \InvalidArgumentException |
130 | 132 | */ |
@@ -265,6 +267,7 @@ discard block |
||
265 | 267 | * the possibility to add $scope variables. |
266 | 268 | * |
267 | 269 | * @param string input |
270 | + * @param string $input |
|
268 | 271 | * |
269 | 272 | * @throws \ErrorException |
270 | 273 | * |
@@ -287,7 +290,7 @@ discard block |
||
287 | 290 | * Add a variable or an array of variables to be shared with all templates that will be rendered |
288 | 291 | * by the instance of Pug. |
289 | 292 | * |
290 | - * @param array|string $variables|$key an associatives array of variable names and values, or a |
|
293 | + * @param array|string $variables an associatives array of variable names and values, or a |
|
291 | 294 | * variable name if you wish to sahre only one |
292 | 295 | * @param mixed $value if you pass an array as first argument, the second |
293 | 296 | * argument will be ignored, else it will used as the |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | } |
51 | 51 | |
52 | 52 | /** |
53 | - * @param $code |
|
53 | + * @param string $code |
|
54 | 54 | * |
55 | 55 | * @return string |
56 | 56 | */ |
@@ -112,6 +112,10 @@ discard block |
||
112 | 112 | return $this->token('newline'); |
113 | 113 | } |
114 | 114 | |
115 | + /** |
|
116 | + * @param string $firstChar |
|
117 | + * @param integer $indents |
|
118 | + */ |
|
115 | 119 | protected function getTokenFromIndent($firstChar, $indents) |
116 | 120 | { |
117 | 121 | if ($this->length() && $firstChar === "\n") { |
@@ -9,6 +9,8 @@ |
||
9 | 9 | { |
10 | 10 | /** |
11 | 11 | * Helper to create tokens. |
12 | + * @param string $regex |
|
13 | + * @param string $type |
|
12 | 14 | */ |
13 | 15 | protected function scan($regex, $type, $captureIndex = 1) |
14 | 16 | { |
@@ -56,6 +56,9 @@ discard block |
||
56 | 56 | return $extensions->getExtensions(); |
57 | 57 | } |
58 | 58 | |
59 | + /** |
|
60 | + * @param string $path |
|
61 | + */ |
|
59 | 62 | protected function hasValidTemplateExtension($path) |
60 | 63 | { |
61 | 64 | $extensions = new ExtensionsHelper($this->extension); |
@@ -79,6 +82,9 @@ discard block |
||
79 | 82 | return $extensions->findValidTemplatePath($path, ''); |
80 | 83 | } |
81 | 84 | |
85 | + /** |
|
86 | + * @param string|null $path |
|
87 | + */ |
|
82 | 88 | protected function getTemplateContents($path, $value = null) |
83 | 89 | { |
84 | 90 | if ($path !== null) { |
@@ -144,6 +150,9 @@ discard block |
||
144 | 150 | return $this->lexer->advance(); |
145 | 151 | } |
146 | 152 | |
153 | + /** |
|
154 | + * @param integer $n |
|
155 | + */ |
|
147 | 156 | public function skip($n) |
148 | 157 | { |
149 | 158 | while ($n--) { |
@@ -199,6 +208,9 @@ discard block |
||
199 | 208 | return $block; |
200 | 209 | } |
201 | 210 | |
211 | + /** |
|
212 | + * @param string $type |
|
213 | + */ |
|
202 | 214 | protected function expect($type) |
203 | 215 | { |
204 | 216 | if ($this->peekType() === $type) { |
@@ -211,6 +223,9 @@ discard block |
||
211 | 223 | throw new \ErrorException("\n" . sprintf('Expected %s, but got %s in %dth line : %s', $type, $this->peekType(), $lineNumber, $lineString) . "\n", 24); |
212 | 224 | } |
213 | 225 | |
226 | + /** |
|
227 | + * @param string $type |
|
228 | + */ |
|
214 | 229 | protected function accept($type) |
215 | 230 | { |
216 | 231 | if ($this->peekType() === $type) { |
@@ -70,7 +70,7 @@ |
||
70 | 70 | /** |
71 | 71 | * Dummy URL stat method to prevent PHP "undefined method" errors. |
72 | 72 | * |
73 | - * @return array |
|
73 | + * @return integer[] |
|
74 | 74 | */ |
75 | 75 | public function url_stat($path, $flags) |
76 | 76 | { |
@@ -9,6 +9,10 @@ |
||
9 | 9 | public function drawFile( $_template ) { |
10 | 10 | return $this->draw($_template); |
11 | 11 | } |
12 | + |
|
13 | + /** |
|
14 | + * @param string $_template |
|
15 | + */ |
|
12 | 16 | public function drawText( $_template ) { |
13 | 17 | return $this->draw(trim($_template)); |
14 | 18 | } |