Completed
Push — master ( 010cd6...22a8dd )
by Todd
11s
created
src/Compiler.php 1 patch
Doc Comments   +23 added lines, -2 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
     }
@@ -1130,8 +1148,8 @@  discard block
 block discarded – undo
1130 1148
     /**
1131 1149
      * Whether or not a node can be skipped for the purposes of trimming whitespace.
1132 1150
      *
1133
-     * @param DOMNode|null $node The node to test.
1134
-     * @param CompilerBuffer|null $out The compiler information.
1151
+     * @param DOMNode $node The node to test.
1152
+     * @param CompilerBuffer $out The compiler information.
1135 1153
      * @return bool Returns **true** if whitespace can be trimmed right up to the node or **false** otherwise.
1136 1154
      */
1137 1155
     private function canSkip(\DOMNode $node, CompilerBuffer $out) {
@@ -1297,6 +1315,9 @@  discard block
 block discarded – undo
1297 1315
         $this->compileCloseTag($node, $special, $out);
1298 1316
     }
1299 1317
 
1318
+    /**
1319
+     * @param string $php
1320
+     */
1300 1321
     protected function compileEscape($php) {
1301 1322
 //        return 'htmlspecialchars('.$php.')';
1302 1323
         return '$this->escape('.$php.')';
Please login to merge, or discard this patch.
src/ExpressionLanguage.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -74,6 +74,9 @@
 block discarded – undo
74 74
         return "\${$field}{$i}";
75 75
     }
76 76
 
77
+    /**
78
+     * @param string $name
79
+     */
77 80
     public function getFunctionCompiler($name) {
78 81
         if (isset($this->functions[$name])) {
79 82
             return $this->functions[$name]['compiler'];
Please login to merge, or discard this patch.