Total Complexity | 1 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | abstract class AParser |
||
12 | { |
||
13 | /** |
||
14 | * Parse input into usable array, remove problematic things |
||
15 | * @param int[]|string[]|int[][]|string[][] $input |
||
16 | * @return int[]|string[]|int[][]|string[][] |
||
17 | */ |
||
18 | abstract public function parseInput(array $input): array; |
||
19 | |||
20 | /** |
||
21 | * Clear Null bytes |
||
22 | * Do not use on files - they are usually valid |
||
23 | * @param string $string |
||
24 | * @param string $nullTo |
||
25 | * @return string |
||
26 | * @link https://resources.infosecinstitute.com/null-byte-injection-php/ |
||
27 | */ |
||
28 | 14 | protected function removeNullBytes($string, $nullTo = '') |
|
33 |