| Conditions | 4 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | 3 | protected function getHarvest(Url $url) |
|
| 31 | { |
||
| 32 | 3 | if (true === $this->fromCache) { |
|
| 33 | 3 | $filePath = $this->recorder->getCacheFilePath($url); |
|
| 34 | 3 | if (null !== $filePath && file_exists($filePath)) { |
|
| 35 | 2 | $response = new ResponseFromCache( |
|
| 36 | 2 | $filePath, |
|
| 37 | 2 | $this->base.$url->uri, |
|
| 38 | 2 | json_decode(file_get_contents($filePath.'---info'), true) |
|
| 39 | ); |
||
| 40 | |||
| 41 | 2 | return new Harvest($response); |
|
| 42 | } |
||
| 43 | } |
||
| 44 | |||
| 45 | 3 | return parent::getHarvest($url); |
|
| 46 | } |
||
| 48 |