1 | <?php |
||
14 | trait HeadersNormalizer |
||
15 | { |
||
16 | /** |
||
17 | * @var int |
||
18 | */ |
||
19 | private $maxHeaderLevel = 2; |
||
20 | |||
21 | /** |
||
22 | * @var int |
||
23 | */ |
||
24 | private $minHeaderLevel = 6; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | private $pattern = '/^(#+)\s+(.*?)\s*$/mius'; |
||
30 | |||
31 | /** |
||
32 | * @return \Closure |
||
33 | */ |
||
34 | protected function normalizeHeaders(): \Closure |
||
50 | |||
51 | /** |
||
52 | * @param string $body |
||
53 | * @return int|mixed |
||
54 | */ |
||
55 | private function getMaxHeaderLevel(string $body) |
||
67 | |||
68 | /** |
||
69 | * @param string $tag |
||
70 | * @return int |
||
71 | */ |
||
72 | private function mdTagToLevel(string $tag): int |
||
78 | } |
||
79 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.