| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | 9 | public function fetchFile( string $fileUrl ): string { |
|
| 41 | 9 | if ( array_key_exists( $fileUrl, $this->files ) ) { |
|
| 42 | 3 | return $this->files[$fileUrl]; |
|
| 43 | } |
||
| 44 | |||
| 45 | 6 | if ( $this->defaultContent === null ) { |
|
| 46 | 5 | throw new FileFetchingException( $fileUrl ); |
|
| 47 | } |
||
| 48 | |||
| 49 | 1 | return $this->defaultContent; |
|
| 50 | } |
||
| 51 | |||
| 53 |