@@ -341,6 +341,10 @@ |
||
341 | 341 | return $file; |
342 | 342 | } |
343 | 343 | |
344 | + /** |
|
345 | + * @param string $class |
|
346 | + * @param string $ext |
|
347 | + */ |
|
344 | 348 | private function findFileWithExtension($class, $ext) |
345 | 349 | { |
346 | 350 | // PSR-4 lookup |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | } |
201 | 201 | |
202 | 202 | /** |
203 | - * @param $method |
|
203 | + * @param string $method |
|
204 | 204 | * @param $arguments |
205 | 205 | * |
206 | 206 | * @throws \BadMethodCallException If the 'apply' rely on non existing method |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | } |
256 | 256 | |
257 | 257 | /** |
258 | - * @param $input |
|
258 | + * @param string $input |
|
259 | 259 | * |
260 | 260 | * @throws \ErrorException |
261 | 261 | * |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | /** |
313 | 313 | * @param string $text |
314 | 314 | * |
315 | - * @return mixed |
|
315 | + * @return string |
|
316 | 316 | */ |
317 | 317 | public function interpolate($text) |
318 | 318 | { |
@@ -379,6 +379,9 @@ discard block |
||
379 | 379 | return $statements; |
380 | 380 | } |
381 | 381 | |
382 | + /** |
|
383 | + * @param string $arg |
|
384 | + */ |
|
382 | 385 | protected function handleArgumentValue($arg) |
383 | 386 | { |
384 | 387 | if (preg_match('/^"(?:\\\\.|[^"\\\\])*"|\'(?:\\\\.|[^\'\\\\])*\'/', $arg)) { |
@@ -87,6 +87,10 @@ discard block |
||
87 | 87 | return $this->escapeIfNeeded($escaped, '$__value'); |
88 | 88 | } |
89 | 89 | |
90 | + /** |
|
91 | + * @param string $key |
|
92 | + * @param string $value |
|
93 | + */ |
|
90 | 94 | protected function getAttributeValue($escaped, $key, $value, &$classesCheck, &$valueCheck) |
91 | 95 | { |
92 | 96 | if ($this->isConstant($value)) { |
@@ -113,6 +117,10 @@ discard block |
||
113 | 117 | : $value; |
114 | 118 | } |
115 | 119 | |
120 | + /** |
|
121 | + * @param string $key |
|
122 | + * @param callable $value |
|
123 | + */ |
|
116 | 124 | protected function compileAttributeValue($key, $value, $attr, $valueCheck) |
117 | 125 | { |
118 | 126 | return $value === true || $attr['value'] === true |
@@ -133,7 +133,7 @@ |
||
133 | 133 | * |
134 | 134 | * @param string $directory the directory to search in pug templates |
135 | 135 | * |
136 | - * @return array count of cached files and error count |
|
136 | + * @return integer[] count of cached files and error count |
|
137 | 137 | */ |
138 | 138 | public function cacheDirectory($directory) |
139 | 139 | { |
@@ -26,6 +26,10 @@ discard block |
||
26 | 26 | $this->separators = array(); |
27 | 27 | } |
28 | 28 | |
29 | + /** |
|
30 | + * @param string $input |
|
31 | + * @param string $name |
|
32 | + */ |
|
29 | 33 | public function innerCode($input, $name) |
30 | 34 | { |
31 | 35 | $handler = new static($input, $name); |
@@ -119,6 +123,9 @@ discard block |
||
119 | 123 | $consume($argument, $match[0]); |
120 | 124 | } |
121 | 125 | |
126 | + /** |
|
127 | + * @param string[] $match |
|
128 | + */ |
|
122 | 129 | protected function parseArrayElement(&$argument, $match, $consume, &$quote, &$key, &$value) |
123 | 130 | { |
124 | 131 | switch ($match[2]) { |
@@ -171,6 +178,9 @@ discard block |
||
171 | 178 | return $handleRecursion(array($sep, end($separators))); |
172 | 179 | } |
173 | 180 | |
181 | + /** |
|
182 | + * @param SubCodeHandler $subCodeHandler |
|
183 | + */ |
|
174 | 184 | protected function parseSeparator($sep, &$separators, &$result, &$varname, $subCodeHandler, $innerName) |
175 | 185 | { |
176 | 186 | $handleCodeInbetween = $subCodeHandler->handleCodeInbetween($separators, $result); |
@@ -7,7 +7,6 @@ discard block |
||
7 | 7 | abstract class CodeVisitor extends TagVisitor |
8 | 8 | { |
9 | 9 | /** |
10 | - * @param Nodes\Code $node |
|
11 | 10 | */ |
12 | 11 | protected function visitCodeConditional(array $matches) |
13 | 12 | { |
@@ -44,7 +43,7 @@ discard block |
||
44 | 43 | } |
45 | 44 | |
46 | 45 | /** |
47 | - * @param Nodes\Code $node |
|
46 | + * @param Code $node |
|
48 | 47 | */ |
49 | 48 | protected function visitCodeOpening(Code $node) |
50 | 49 | { |
@@ -68,7 +67,7 @@ discard block |
||
68 | 67 | } |
69 | 68 | |
70 | 69 | /** |
71 | - * @param Nodes\Code $node |
|
70 | + * @param Code $node |
|
72 | 71 | */ |
73 | 72 | protected function visitCode(Code $node) |
74 | 73 | { |
@@ -56,8 +56,6 @@ |
||
56 | 56 | * Return true if the ending quote of the string is escaped. |
57 | 57 | * |
58 | 58 | * @param object|array $anything object or array (PHP >= 7) that contains a callable |
59 | - * @param string|int $key|$method key or method name |
|
60 | - * @param bool $isMethod true if the second argument is a method |
|
61 | 59 | * |
62 | 60 | * @return string |
63 | 61 | */ |
@@ -73,7 +73,6 @@ |
||
73 | 73 | /** |
74 | 74 | * Get property from object. |
75 | 75 | * |
76 | - * @param object $object source object |
|
77 | 76 | * @param mixed $key key to retrive from the object or the array |
78 | 77 | * |
79 | 78 | * @return mixed |
@@ -179,7 +179,7 @@ |
||
179 | 179 | * |
180 | 180 | * @param array $value |
181 | 181 | * |
182 | - * @return string|mixed |
|
182 | + * @return string |
|
183 | 183 | */ |
184 | 184 | protected static function joinAny($value) |
185 | 185 | { |