Total Complexity | 4 |
Total Lines | 19 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
5 | class FileLoader implements Loader |
||
6 | { |
||
7 | private $filepath; |
||
8 | |||
9 | 4 | public function __construct(string $filepath) |
|
10 | { |
||
11 | 4 | $this->filepath = $this->getFilepathWithExtension($filepath); |
|
12 | 4 | } |
|
13 | |||
14 | 4 | public function get(): string |
|
15 | { |
||
16 | 4 | return file_get_contents($this->filepath); |
|
17 | } |
||
18 | |||
19 | 4 | private function getFilepathWithExtension($filepath) |
|
24 | } |
||
25 | } |
||
26 |