@@ -292,6 +292,9 @@ discard block  | 
                                                    ||
| 292 | 292 | strlen($haystack);  | 
                                                        
| 293 | 293 | }  | 
                                                        
| 294 | 294 | |
| 295 | + /**  | 
                                                        |
| 296 | + * @param integer $readMaximumBytes  | 
                                                        |
| 297 | + */  | 
                                                        |
| 295 | 298 | protected function convertBodyToString(StreamInterface $bodyStream, $readMaximumBytes = 1024 * 1024 * 2): string  | 
                                                        
| 296 | 299 |      { | 
                                                        
| 297 | 300 | $bodyStream->rewind();  | 
                                                        
@@ -302,7 +305,7 @@ discard block  | 
                                                    ||
| 302 | 305 | }  | 
                                                        
| 303 | 306 | |
| 304 | 307 | /**  | 
                                                        
| 305 | - * @param ResponseInterface|null $response  | 
                                                        |
| 308 | + * @param ResponseInterface $response  | 
                                                        |
| 306 | 309 | * @param CrawlUrl $crawlUrl  | 
                                                        
| 307 | 310 | */  | 
                                                        
| 308 | 311 | protected function handleCrawled(ResponseInterface $response, CrawlUrl $crawlUrl)  | 
                                                        
@@ -429,6 +432,9 @@ discard block  | 
                                                    ||
| 429 | 432 | return in_array($uri->getScheme(), ['http', 'https']);  | 
                                                        
| 430 | 433 | }  | 
                                                        
| 431 | 434 | |
| 435 | + /**  | 
                                                        |
| 436 | + * @return Node  | 
                                                        |
| 437 | + */  | 
                                                        |
| 432 | 438 | protected function addtoDepthTree(Node $node, UriInterface $url, UriInterface $parentUrl)  | 
                                                        
| 433 | 439 |      { | 
                                                        
| 434 | 440 | $returnNode = null;  | 
                                                        
@@ -2,9 +2,9 @@  | 
                                                    ||
| 2 | 2 | |
| 3 | 3 | namespace Spatie\Crawler;  | 
                                                        
| 4 | 4 | |
| 5 | +use GuzzleHttp\Exception\RequestException;  | 
                                                        |
| 5 | 6 | use Psr\Http\Message\ResponseInterface;  | 
                                                        
| 6 | 7 | use Psr\Http\Message\UriInterface;  | 
                                                        
| 7 | -use GuzzleHttp\Exception\RequestException;  | 
                                                        |
| 8 | 8 | |
| 9 | 9 | abstract class CrawlObserver  | 
                                                        
| 10 | 10 |  { |