@@ -11,6 +11,10 @@ |
||
11 | 11 | function arrayHtmlParser($_array) { |
12 | 12 | return travelStringArray($_array,"htmlParser"); |
13 | 13 | } |
14 | + |
|
15 | + /** |
|
16 | + * @param string $_function |
|
17 | + */ |
|
14 | 18 | function travelStringArray ( $_array, $_function ) { |
15 | 19 | if (is_array($_array)) { |
16 | 20 | foreach ($_array as $k => $v) { |
@@ -17,6 +17,10 @@ |
||
17 | 17 | }); |
18 | 18 | return $temp; |
19 | 19 | } |
20 | + |
|
21 | + /** |
|
22 | + * @param Closure $_function |
|
23 | + */ |
|
20 | 24 | function fetchInSubFolder( $_dir = "./", $_function) { |
21 | 25 | $temp = []; |
22 | 26 | if (is_dir($_dir)) { |
@@ -1,4 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | + /** |
|
3 | + * @param string $_path |
|
4 | + */ |
|
2 | 5 | function requireComponent( $_path, $_local = true ) { |
3 | 6 | $path = getJFolder($_path, $_local, debug_backtrace()); |
4 | 7 | if(file_exists($path) && isPhp($path)) |
@@ -6,6 +9,10 @@ discard block |
||
6 | 9 | else |
7 | 10 | requireError($_path); |
8 | 11 | } |
12 | + |
|
13 | + /** |
|
14 | + * @param string $_path |
|
15 | + */ |
|
9 | 16 | function requireComponents( $_path, $_local = true ) { |
10 | 17 | $path = getJFolder($_path, $_local, debug_backtrace()); |
11 | 18 | if(file_exists($path)) { |
@@ -38,6 +45,10 @@ discard block |
||
38 | 45 | $path = getJFolder($_path, $_local, debug_backtrace()); |
39 | 46 | require_once( $path ); |
40 | 47 | } |
48 | + |
|
49 | + /** |
|
50 | + * @param boolean $_local |
|
51 | + */ |
|
41 | 52 | function getJFolder( $_path, $_local, $_stack ) { |
42 | 53 | if($_local) { |
43 | 54 | $stackInfo = $_stack; |
@@ -66,6 +66,11 @@ |
||
66 | 66 | $this->tags["js"] = $this->getJs(); |
67 | 67 | $this->tags["jsVariables"] = $this->getJsVariables(); |
68 | 68 | } |
69 | + |
|
70 | + /** |
|
71 | + * @param string $_function |
|
72 | + * @param string $_extenction |
|
73 | + */ |
|
69 | 74 | protected function getRequire( $_function, $_extenction) { |
70 | 75 | $temp = []; |
71 | 76 | foreach ($this->required as $i) |
@@ -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); |