Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | protected function normalizeHeaders(): \Closure |
||
32 | { |
||
33 | return function (string $body) { |
||
34 | return preg_replace_callback('/^(#+)\s+(.*?)\s*$/mius', function (array $matches) { |
||
35 | [$body, $level, $title] = $matches; |
||
36 | |||
37 | $size = $this->tags[ |
||
38 | max(1, min(6, strlen($level))) |
||
39 | ]; |
||
40 | |||
41 | return str_repeat('#', $size) . ' ' . $title; |
||
42 | }, $body); |
||
43 | }; |
||
44 | } |
||
45 | } |
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.