| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function crawled(UriInterface $url, ResponseInterface $response, ?UriInterface $foundOnUrl = null) |
||
| 30 | { |
||
| 31 | if ($response->getStatusCode() !== 200) { |
||
| 32 | throw new RuntimeException("URL [{$url}] returned status code [{$response->getStatusCode()}]"); |
||
| 33 | } |
||
| 34 | |||
| 35 | $this->destination->write( |
||
| 36 | $this->normalizePath($url->getPath()), |
||
| 37 | (string) $response->getBody() |
||
| 38 | ); |
||
| 39 | } |
||
| 40 | |||
| 46 |