Completed
Push — master ( 6dce30...010cd6 )
by Todd
04:28
created
src/Compiler.php 1 patch
Doc Comments   +24 added lines, -3 removed lines patch added patch discarded remove patch
@@ -268,6 +268,11 @@  discard block
 block discarded – undo
268 268
         );
269 269
     }
270 270
 
271
+    /**
272
+     * @param callable $function
273
+     *
274
+     * @return callable
275
+     */
271 276
     private function getFunctionEvaluator($function) {
272 277
         if ($function === 'empty') {
273 278
             return function ($expr) {
@@ -282,6 +287,10 @@  discard block
 block discarded – undo
282 287
         return $function;
283 288
     }
284 289
 
290
+    /**
291
+     * @param string $name
292
+     * @param callable $function
293
+     */
285 294
     private function getFunctionCompiler($name, $function) {
286 295
         $var = var_export(strtolower($name), true);
287 296
         $fn = function (...$args) use ($var) {
@@ -362,6 +371,9 @@  discard block
 block discarded – undo
362 371
         return $r;
363 372
     }
364 373
 
374
+    /**
375
+     * @param string $tag
376
+     */
365 377
     protected function isComponent($tag) {
366 378
         return !isset(static::$htmlTags[$tag]);
367 379
     }
@@ -492,6 +504,9 @@  discard block
 block discarded – undo
492 504
         }
493 505
     }
494 506
 
507
+    /**
508
+     * @param string $value
509
+     */
495 510
     protected function splitExpressions($value) {
496 511
         $values = preg_split('`({\S[^}]*?})`', $value, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE);
497 512
         return $values;
@@ -844,6 +859,9 @@  discard block
 block discarded – undo
844 859
         }
845 860
     }
846 861
 
862
+    /**
863
+     * @param string $value
864
+     */
847 865
     private function isExpression($value) {
848 866
         return preg_match('`^{\S.*}$`', $value);
849 867
     }
@@ -1115,8 +1133,8 @@  discard block
 block discarded – undo
1115 1133
     /**
1116 1134
      * Whether or not a node can be skipped for the purposes of trimming whitespace.
1117 1135
      *
1118
-     * @param DOMNode|null $node The node to test.
1119
-     * @param CompilerBuffer|null $out The compiler information.
1136
+     * @param DOMNode $node The node to test.
1137
+     * @param CompilerBuffer $out The compiler information.
1120 1138
      * @return bool Returns **true** if whitespace can be trimmed right up to the node or **false** otherwise.
1121 1139
      */
1122 1140
     private function canSkip(\DOMNode $node, CompilerBuffer $out) {
@@ -1257,7 +1275,7 @@  discard block
 block discarded – undo
1257 1275
      *
1258 1276
      * @param DOMNode $node
1259 1277
      * @param callable $test
1260
-     * @return bool
1278
+     * @return DOMNode
1261 1279
      */
1262 1280
     private function closest(\DOMNode $node, callable $test) {
1263 1281
         for ($visitor = $node; $visitor !== null && !$test($visitor); $visitor = $visitor->parentNode) {
@@ -1282,6 +1300,9 @@  discard block
 block discarded – undo
1282 1300
         $this->compileCloseTag($node, $special, $out);
1283 1301
     }
1284 1302
 
1303
+    /**
1304
+     * @param string $php
1305
+     */
1285 1306
     protected function compileEscape($php) {
1286 1307
 //        return 'htmlspecialchars('.$php.')';
1287 1308
         return '$this->escape('.$php.')';
Please login to merge, or discard this patch.