@@ -332,6 +332,8 @@ discard block |
||
332 | 332 | * @param string &$head |
333 | 333 | * @param string &$tail |
334 | 334 | * @param bool $passthrough |
335 | + * @param string $head |
|
336 | + * @param string $tail |
|
335 | 337 | * @return void |
336 | 338 | */ |
337 | 339 | protected static function convertPHP(&$head, &$tail, $passthrough) |
@@ -349,6 +351,10 @@ discard block |
||
349 | 351 | "(\\\$node->getAttribute\\('([^']+)'\\))", |
350 | 352 | preg_replace_callback( |
351 | 353 | '(if\\(\\$node->hasAttribute\\(([^\\)]+)[^}]+)', |
354 | + |
|
355 | + /** |
|
356 | + * @param string $m |
|
357 | + */ |
|
352 | 358 | function ($m) |
353 | 359 | { |
354 | 360 | return str_replace('$node->getAttribute(' . $m[1] . ')', '', $m[0]); |
@@ -667,7 +673,7 @@ discard block |
||
667 | 673 | * Get a string suitable as a str_replace() replacement for given PHP code |
668 | 674 | * |
669 | 675 | * @param string $php Original code |
670 | - * @return bool|string Static replacement if possible, or FALSE otherwise |
|
676 | + * @return string|false Static replacement if possible, or FALSE otherwise |
|
671 | 677 | */ |
672 | 678 | protected static function getStaticRendering($php) |
673 | 679 | { |
@@ -689,7 +695,7 @@ discard block |
||
689 | 695 | * Get string rendering strategies for given chunks |
690 | 696 | * |
691 | 697 | * @param string $php |
692 | - * @return array |
|
698 | + * @return string |
|
693 | 699 | */ |
694 | 700 | protected static function getStringRenderings($php) |
695 | 701 | { |