| Total Complexity | 7 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class JsonStringReader { |
||
| 10 | |||
| 11 | private $file; |
||
| 12 | private $fileFetcher; |
||
| 13 | private $json; |
||
| 14 | |||
| 15 | 4 | public function __construct( string $file, FileFetcher $fileFetcher ) { |
|
| 16 | 4 | $this->file = $file; |
|
| 17 | 4 | $this->fileFetcher = $fileFetcher; |
|
| 18 | 4 | } |
|
| 19 | |||
| 20 | 4 | private function getJsonFile(): string { |
|
| 22 | } |
||
| 23 | |||
| 24 | 3 | private function isJsonEmpty(): bool { |
|
| 25 | 3 | return $this->json === ''; |
|
| 26 | } |
||
| 27 | |||
| 28 | 2 | private function isJsonValid(): bool { |
|
| 31 | } |
||
| 32 | |||
| 33 | 4 | public function readAndValidateJson(): string { |
|
| 39 | } |
||
| 40 | } |