@@ -489,6 +489,8 @@ discard block |
||
| 489 | 489 | * @param string &$head |
| 490 | 490 | * @param string &$tail |
| 491 | 491 | * @param bool $passthrough |
| 492 | + * @param string $head |
|
| 493 | + * @param string $tail |
|
| 492 | 494 | * @return void |
| 493 | 495 | */ |
| 494 | 496 | protected static function convertPHP(&$head, &$tail, $passthrough) |
@@ -506,6 +508,10 @@ discard block |
||
| 506 | 508 | "(\\\$node->getAttribute\\('([^']+)'\\))", |
| 507 | 509 | preg_replace_callback( |
| 508 | 510 | '(if\\(\\$node->hasAttribute\\(([^\\)]+)[^}]+)', |
| 511 | + |
|
| 512 | + /** |
|
| 513 | + * @param string $m |
|
| 514 | + */ |
|
| 509 | 515 | function ($m) |
| 510 | 516 | { |
| 511 | 517 | return str_replace('$node->getAttribute(' . $m[1] . ')', '', $m[0]); |
@@ -858,7 +864,7 @@ discard block |
||
| 858 | 864 | * Get a string suitable as a str_replace() replacement for given PHP code |
| 859 | 865 | * |
| 860 | 866 | * @param string $php Original code |
| 861 | - * @return bool|string Static replacement if possible, or FALSE otherwise |
|
| 867 | + * @return string|false Static replacement if possible, or FALSE otherwise |
|
| 862 | 868 | */ |
| 863 | 869 | protected static function getStaticRendering($php) |
| 864 | 870 | { |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | * Filter an IP:port value (includes IPv4 and IPv6) |
| 128 | 128 | * |
| 129 | 129 | * @param string $attrValue Original value |
| 130 | - * @return mixed Filtered value, or FALSE if invalid |
|
| 130 | + * @return false|string Filtered value, or FALSE if invalid |
|
| 131 | 131 | */ |
| 132 | 132 | public static function filterIpport($attrValue) |
| 133 | 133 | { |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | * @param mixed $attrValue Original URL |
| 317 | 317 | * @param array $urlConfig URL config |
| 318 | 318 | * @param Logger $logger Parser's logger |
| 319 | - * @return mixed Cleaned up URL if valid, FALSE otherwise |
|
| 319 | + * @return false|string Cleaned up URL if valid, FALSE otherwise |
|
| 320 | 320 | */ |
| 321 | 321 | public static function filterUrl($attrValue, array $urlConfig, Logger $logger = null) |
| 322 | 322 | { |
@@ -136,7 +136,7 @@ |
||
| 136 | 136 | * Query the Closure Compiler service |
| 137 | 137 | * |
| 138 | 138 | * @param string $body Request body |
| 139 | - * @return string|false Response body, or FALSE |
|
| 139 | + * @return string|boolean Response body, or FALSE |
|
| 140 | 140 | */ |
| 141 | 141 | protected function query($body) |
| 142 | 142 | { |
@@ -42,11 +42,16 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | /** |
| 44 | 44 | * {@inheritdoc} |
| 45 | + * @param string $expr |
|
| 45 | 46 | */ |
| 46 | 47 | protected function evaluateExpression($expr) |
| 47 | 48 | { |
| 48 | 49 | $expr = preg_replace_callback( |
| 49 | 50 | '(([\'"])(.*?)\\1)s', |
| 51 | + |
|
| 52 | + /** |
|
| 53 | + * @param string $m |
|
| 54 | + */ |
|
| 50 | 55 | function ($m) |
| 51 | 56 | { |
| 52 | 57 | return $m[1] . bin2hex($m[2]) . $m[1]; |
@@ -56,6 +61,10 @@ discard block |
||
| 56 | 61 | $expr = parent::evaluateExpression($expr); |
| 57 | 62 | $expr = preg_replace_callback( |
| 58 | 63 | '(([\'"])(.*?)\\1)s', |
| 64 | + |
|
| 65 | + /** |
|
| 66 | + * @param string $m |
|
| 67 | + */ |
|
| 59 | 68 | function ($m) |
| 60 | 69 | { |
| 61 | 70 | return $m[1] . hex2bin($m[2]) . $m[1]; |