@@ -245,6 +245,11 @@ discard block |
||
245 | 245 | ); |
246 | 246 | } |
247 | 247 | |
248 | + /** |
|
249 | + * @param callable $function |
|
250 | + * |
|
251 | + * @return callable |
|
252 | + */ |
|
248 | 253 | private function getFunctionEvaluator($function) { |
249 | 254 | if ($function === 'empty') { |
250 | 255 | return function ($expr) { |
@@ -259,6 +264,10 @@ discard block |
||
259 | 264 | return $function; |
260 | 265 | } |
261 | 266 | |
267 | + /** |
|
268 | + * @param string $name |
|
269 | + * @param callable $function |
|
270 | + */ |
|
262 | 271 | private function getFunctionCompiler($name, $function) { |
263 | 272 | $var = var_export(strtolower($name), true); |
264 | 273 | $fn = function ($expr) use ($var) { |
@@ -334,6 +343,9 @@ discard block |
||
334 | 343 | return $r; |
335 | 344 | } |
336 | 345 | |
346 | + /** |
|
347 | + * @param string $tag |
|
348 | + */ |
|
337 | 349 | protected function isComponent($tag) { |
338 | 350 | return !isset(static::$htmlTags[$tag]); |
339 | 351 | } |
@@ -748,6 +760,9 @@ discard block |
||
748 | 760 | } |
749 | 761 | } |
750 | 762 | |
763 | + /** |
|
764 | + * @param string $value |
|
765 | + */ |
|
751 | 766 | private function isExpression($value) { |
752 | 767 | return preg_match('`^{\S.*}$`', $value); |
753 | 768 | } |
@@ -987,6 +1002,9 @@ discard block |
||
987 | 1002 | return $text; |
988 | 1003 | } |
989 | 1004 | |
1005 | + /** |
|
1006 | + * @param string $text |
|
1007 | + */ |
|
990 | 1008 | protected function rtrim($text, \DOMNode $node, CompilerBuffer $out) { |
991 | 1009 | if ($this->inPre($node)) { |
992 | 1010 | return $text; |
@@ -50,6 +50,9 @@ discard block |
||
50 | 50 | } |
51 | 51 | } |
52 | 52 | |
53 | + /** |
|
54 | + * @param boolean $append |
|
55 | + */ |
|
53 | 56 | private function ensureEcho($append) { |
54 | 57 | if (!$this->inEcho) { |
55 | 58 | $this->buffer .= $this->px().'echo '; |
@@ -137,7 +140,7 @@ discard block |
||
137 | 140 | /** |
138 | 141 | * Get the depth. |
139 | 142 | * |
140 | - * @return mixed Returns the depth. |
|
143 | + * @return integer Returns the depth. |
|
141 | 144 | */ |
142 | 145 | public function getDepth() { |
143 | 146 | return $this->depth; |
@@ -90,6 +90,11 @@ |
||
90 | 90 | $this->compiler->defineFunction($name, $function); |
91 | 91 | } |
92 | 92 | |
93 | + /** |
|
94 | + * @param string $func |
|
95 | + * |
|
96 | + * @return callable|null |
|
97 | + */ |
|
93 | 98 | private function mb($func) { |
94 | 99 | return function_exists("mb_$func") ? "mb_$func" : $func; |
95 | 100 | } |
@@ -39,6 +39,9 @@ |
||
39 | 39 | }); |
40 | 40 | } |
41 | 41 | |
42 | + /** |
|
43 | + * @param string $name |
|
44 | + */ |
|
42 | 45 | public function getFunctionCompiler($name) { |
43 | 46 | if (isset($this->functions[$name])) { |
44 | 47 | return $this->functions[$name]['compiler']; |
@@ -7,7 +7,6 @@ |
||
7 | 7 | |
8 | 8 | namespace Ebi; |
9 | 9 | |
10 | -use Symfony\Component\ExpressionLanguage\ExpressionFunction; |
|
11 | 10 | use Symfony\Component\ExpressionLanguage\Node\GetAttrNode; |
12 | 11 | |
13 | 12 | class ExpressionLanguage extends \Symfony\Component\ExpressionLanguage\ExpressionLanguage { |
@@ -50,6 +50,9 @@ |
||
50 | 50 | } |
51 | 51 | } |
52 | 52 | |
53 | + /** |
|
54 | + * @param string $component |
|
55 | + */ |
|
53 | 56 | private function componentPath($component, $full = true) { |
54 | 57 | $subpath = str_replace('.', DIRECTORY_SEPARATOR, $component); |
55 | 58 |
@@ -77,6 +77,9 @@ discard block |
||
77 | 77 | $this->current->echoLiteral($value); |
78 | 78 | } |
79 | 79 | |
80 | + /** |
|
81 | + * @param string $php |
|
82 | + */ |
|
80 | 83 | public function echoCode($php) { |
81 | 84 | $this->current->echoCode($php); |
82 | 85 | } |
@@ -85,6 +88,9 @@ discard block |
||
85 | 88 | $this->current->appendCode($php); |
86 | 89 | } |
87 | 90 | |
91 | + /** |
|
92 | + * @param integer $add |
|
93 | + */ |
|
88 | 94 | public function indent($add) { |
89 | 95 | $this->current->indent($add); |
90 | 96 | } |
@@ -93,6 +99,9 @@ discard block |
||
93 | 99 | $this->current->depth($add); |
94 | 100 | } |
95 | 101 | |
102 | + /** |
|
103 | + * @param string $name |
|
104 | + */ |
|
96 | 105 | public function depthName($name, $add = 0) { |
97 | 106 | return $this->current->depthName($name, $add); |
98 | 107 | } |
@@ -192,6 +201,9 @@ discard block |
||
192 | 201 | return $this; |
193 | 202 | } |
194 | 203 | |
204 | + /** |
|
205 | + * @param string $name |
|
206 | + */ |
|
195 | 207 | public function getNodeProp(\DOMNode $node, $name, $default = null) { |
196 | 208 | if (!$this->nodeProps->contains($node) || !array_key_exists($name, $this->nodeProps[$node])) { |
197 | 209 | return $default; |
@@ -199,6 +211,10 @@ discard block |
||
199 | 211 | return $this->nodeProps[$node][$name]; |
200 | 212 | } |
201 | 213 | |
214 | + /** |
|
215 | + * @param string $name |
|
216 | + * @param boolean $value |
|
217 | + */ |
|
202 | 218 | public function setNodeProp(\DOMNode $node = null, $name, $value) { |
203 | 219 | if ($node === null) { |
204 | 220 | return $this; |
@@ -286,7 +302,7 @@ discard block |
||
286 | 302 | /** |
287 | 303 | * Set the source. |
288 | 304 | * |
289 | - * @param mixed $source |
|
305 | + * @param string $source |
|
290 | 306 | * @return $this |
291 | 307 | */ |
292 | 308 | public function setSource($source) { |