Completed
Push — master ( e74c1e...60ad25 )
by Freek
02:08
created
src/CrawlQueue/CollectionCrawlQueue.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
     }
69 69
 
70 70
     /**
71
-     * @param CrawlUrl|\Psr\Http\Message\UriInterface|string $crawlUrl
71
+     * @param CrawlUrl $crawlUrl
72 72
      *
73 73
      * @return bool
74 74
      */
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace Spatie\Crawler\CrawlQueue;
4 4
 
5
-use Spatie\Crawler\CrawlUrl;
6 5
 use Illuminate\Support\Collection;
6
+use Spatie\Crawler\CrawlUrl;
7 7
 use Spatie\Crawler\Exception\UrlNotFoundByIndex;
8 8
 
9 9
 class CollectionCrawlQueue implements CrawlQueue
Please login to merge, or discard this patch.
src/Crawler.php 2 patches
Unused Use Statements   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -3,23 +3,23 @@
 block discarded – undo
3 3
 namespace Spatie\Crawler;
4 4
 
5 5
 use Generator;
6
-use Tree\Node\Node;
7
-use GuzzleHttp\Pool;
8 6
 use GuzzleHttp\Client;
9
-use GuzzleHttp\Psr7\Uri;
7
+use GuzzleHttp\Exception\RequestException;
8
+use GuzzleHttp\Pool;
10 9
 use GuzzleHttp\Psr7\Request;
11
-use InvalidArgumentException;
10
+use GuzzleHttp\Psr7\Uri;
12 11
 use GuzzleHttp\RequestOptions;
13 12
 use Illuminate\Support\Collection;
13
+use InvalidArgumentException;
14
+use Psr\Http\Message\ResponseInterface;
15
+use Psr\Http\Message\StreamInterface;
14 16
 use Psr\Http\Message\UriInterface;
15 17
 use Spatie\Browsershot\Browsershot;
16
-use Psr\Http\Message\StreamInterface;
17
-use Symfony\Component\DomCrawler\Link;
18
-use Psr\Http\Message\ResponseInterface;
19
-use Spatie\Crawler\CrawlQueue\CrawlQueue;
20
-use GuzzleHttp\Exception\RequestException;
21 18
 use Spatie\Crawler\CrawlQueue\CollectionCrawlQueue;
19
+use Spatie\Crawler\CrawlQueue\CrawlQueue;
22 20
 use Symfony\Component\DomCrawler\Crawler as DomCrawler;
21
+use Symfony\Component\DomCrawler\Link;
22
+use Tree\Node\Node;
23 23
 
24 24
 class Crawler
25 25
 {
Please login to merge, or discard this patch.
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -273,6 +273,9 @@  discard block
 block discarded – undo
273 273
             strlen($haystack);
274 274
     }
275 275
 
276
+    /**
277
+     * @param integer $readMaximumBytes
278
+     */
276 279
     protected function convertBodyToString(StreamInterface $bodyStream, $readMaximumBytes = 1024 * 1024 * 2): string
277 280
     {
278 281
         $bodyStream->rewind();
@@ -382,6 +385,9 @@  discard block
 block discarded – undo
382 385
         return in_array($uri->getScheme(), ['http', 'https']);
383 386
     }
384 387
 
388
+    /**
389
+     * @return Node
390
+     */
385 391
     protected function addtoDepthTree(Node $node, UriInterface $url, UriInterface $parentUrl)
386 392
     {
387 393
         $returnNode = null;
Please login to merge, or discard this patch.