1 | <?php |
||
8 | final class HeaderLine |
||
9 | { |
||
10 | /** |
||
11 | * @var HeaderInterface |
||
12 | */ |
||
13 | private $header; |
||
14 | |||
15 | /** |
||
16 | * @param HeaderInterface $header |
||
17 | */ |
||
18 | 76 | public function __construct(HeaderInterface $header) |
|
22 | |||
23 | /** |
||
24 | * @return HeaderInterface |
||
25 | */ |
||
26 | 47 | public function getHeader(): HeaderInterface |
|
30 | |||
31 | /** |
||
32 | * @return string |
||
33 | */ |
||
34 | 62 | public function __toString(): string |
|
50 | |||
51 | /** |
||
52 | * @param string $line |
||
53 | * @return HeaderLine |
||
54 | */ |
||
55 | 49 | public static function fromString(string $line): HeaderLine |
|
79 | } |
||
80 |
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.