Conditions | 4 |
Paths | 6 |
Total Lines | 18 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 4.25 |
Changes | 4 | ||
Bugs | 2 | Features | 0 |
1 | <?php |
||
4838 | 2 | public static function parse_str(string $str, &$result, bool $clean_utf8 = false): bool |
|
4839 | { |
||
4840 | 2 | if ($clean_utf8) { |
|
4841 | 2 | $str = self::clean($str); |
|
4842 | } |
||
4843 | |||
4844 | 2 | if (self::$SUPPORT['mbstring'] === true) { |
|
4845 | 2 | $return = \mb_parse_str($str, $result); |
|
4846 | |||
4847 | 2 | return $return !== false && $result !== []; |
|
4848 | } |
||
4849 | |||
4850 | /** |
||
4851 | * @psalm-suppress ImpureFunctionCall - we use the second parameter, so we don't change variables by magic |
||
4852 | */ |
||
4853 | \parse_str($str, $result); |
||
4854 | |||
4855 | return $result !== []; |
||
4856 | } |
||
13722 |