1 | <?php |
||
12 | class Js implements Extension |
||
13 | { |
||
14 | protected $publicDirectory; |
||
15 | |||
16 | protected $defer = false; |
||
17 | protected $async = false; |
||
18 | |||
19 | 9 | public function __construct( |
|
20 | string $publicDirectory |
||
21 | ) { |
||
22 | 9 | $this->publicDirectory = $publicDirectory; |
|
23 | 9 | } |
|
24 | |||
25 | 4 | public function name(): string |
|
26 | { |
||
27 | 4 | return 'js'; |
|
28 | } |
||
29 | |||
30 | 5 | public function link(string $src): string |
|
48 | |||
49 | 1 | public function inline(string $src): string |
|
55 | |||
56 | 3 | public function defer(): Js |
|
62 | |||
63 | 1 | public function async(): Js |
|
69 | |||
70 | 7 | public function parseSource(string $src): Source |
|
71 | { |
||
88 | |||
89 | 7 | protected function saveFile(string $path, string $content): void |
|
98 | } |
||
99 |
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.