1 | <?php |
||
5 | class Parser |
||
6 | { |
||
7 | /** @var string */ |
||
8 | protected $body; |
||
9 | |||
10 | /** @var string */ |
||
11 | protected $group; |
||
12 | |||
13 | /** @var string */ |
||
14 | protected $subgroup; |
||
15 | |||
16 | /** @var array */ |
||
17 | protected $emojis = []; |
||
18 | |||
19 | /** @var array */ |
||
20 | protected $groups = []; |
||
21 | |||
22 | public function __construct(string $body) |
||
26 | |||
27 | public function parse() |
||
35 | |||
36 | public function getEmojis(): array |
||
40 | |||
41 | public function getGroups(): array |
||
45 | |||
46 | protected function parseLine(string $line) |
||
82 | |||
83 | protected function addEmoji(string $code, string $name) |
||
90 | } |
||
91 |
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.