1 | <?php |
||
13 | class InMemoryFileFetcher implements FileFetcher { |
||
14 | |||
15 | /** |
||
16 | * @param string[] $files |
||
17 | * @throws InvalidArgumentException |
||
18 | */ |
||
19 | public function __construct( array $files ) { |
||
28 | |||
29 | /** |
||
30 | * @see FileFetcher::fetchFile |
||
31 | * |
||
32 | * @param string $fileUrl |
||
33 | * |
||
34 | * @return string |
||
35 | * @throws FileFetchingException |
||
36 | */ |
||
37 | public function fetchFile( $fileUrl ) { |
||
44 | |||
45 | } |
||
46 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: