Completed
Push — master ( c5a351...6e1b6f )
by Freek
01:19
created
src/CrawlObserver.php 1 patch
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@
 block discarded – undo
2 2
 
3 3
 namespace Spatie\Crawler;
4 4
 
5
-use Psr\Http\Message\UriInterface;
6
-use Psr\Http\Message\ResponseInterface;
7 5
 use GuzzleHttp\Exception\RequestException;
6
+use Psr\Http\Message\ResponseInterface;
7
+use Psr\Http\Message\UriInterface;
8 8
 
9 9
 abstract class CrawlObserver
10 10
 {
Please login to merge, or discard this patch.
src/CrawlerRobots.php 1 patch
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@
 block discarded – undo
2 2
 
3 3
 namespace Spatie\Crawler;
4 4
 
5
-use Spatie\Robots\RobotsMeta;
6
-use Spatie\Robots\RobotsHeaders;
7 5
 use Psr\Http\Message\ResponseInterface;
6
+use Spatie\Robots\RobotsHeaders;
7
+use Spatie\Robots\RobotsMeta;
8 8
 
9 9
 class CrawlerRobots
10 10
 {
Please login to merge, or discard this patch.
src/Crawler.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -340,6 +340,9 @@
 block discarded – undo
340 340
         }
341 341
     }
342 342
 
343
+    /**
344
+     * @return Node
345
+     */
343 346
     public function addToDepthTree(UriInterface $url, UriInterface $parentUrl, Node $node = null): ?Node
344 347
     {
345 348
         if (is_null($this->maximumDepth)) {
Please login to merge, or discard this patch.
Unused Use Statements   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -3,20 +3,20 @@
 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\Pool;
10 8
 use GuzzleHttp\Psr7\Request;
11
-use Spatie\Robots\RobotsTxt;
9
+use GuzzleHttp\Psr7\Uri;
12 10
 use GuzzleHttp\RequestOptions;
13 11
 use Psr\Http\Message\UriInterface;
14 12
 use Spatie\Browsershot\Browsershot;
15
-use Spatie\Crawler\CrawlQueue\CrawlQueue;
16 13
 use Spatie\Crawler\CrawlQueue\ArrayCrawlQueue;
14
+use Spatie\Crawler\CrawlQueue\CrawlQueue;
15
+use Spatie\Crawler\Exception\InvalidCrawlRequestHandler;
17 16
 use Spatie\Crawler\Handlers\CrawlRequestFailed;
18 17
 use Spatie\Crawler\Handlers\CrawlRequestFulfilled;
19
-use Spatie\Crawler\Exception\InvalidCrawlRequestHandler;
18
+use Spatie\Robots\RobotsTxt;
19
+use Tree\Node\Node;
20 20
 
21 21
 class Crawler
22 22
 {
Please login to merge, or discard this patch.
src/Handlers/CrawlRequestFulfilled.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -74,6 +74,9 @@
 block discarded – undo
74 74
         $this->crawler->getCrawlObservers()->crawled($crawlUrl, $response);
75 75
     }
76 76
 
77
+    /**
78
+     * @param integer $readMaximumBytes
79
+     */
77 80
     protected function convertBodyToString(StreamInterface $bodyStream, $readMaximumBytes = 1024 * 1024 * 2): string
78 81
     {
79 82
         $bodyStream->rewind();
Please login to merge, or discard this patch.
Unused Use Statements   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -3,15 +3,15 @@
 block discarded – undo
3 3
 namespace Spatie\Crawler\Handlers;
4 4
 
5 5
 use GuzzleHttp\Psr7\Uri;
6
-use Spatie\Crawler\Crawler;
7
-use Spatie\Crawler\CrawlUrl;
8
-use Spatie\Crawler\LinkAdder;
9
-use Spatie\Crawler\CrawlerRobots;
10 6
 use GuzzleHttp\RedirectMiddleware;
7
+use Psr\Http\Message\ResponseInterface;
8
+use Psr\Http\Message\StreamInterface;
11 9
 use Psr\Http\Message\UriInterface;
12 10
 use Spatie\Crawler\CrawlSubdomains;
13
-use Psr\Http\Message\StreamInterface;
14
-use Psr\Http\Message\ResponseInterface;
11
+use Spatie\Crawler\CrawlUrl;
12
+use Spatie\Crawler\Crawler;
13
+use Spatie\Crawler\CrawlerRobots;
14
+use Spatie\Crawler\LinkAdder;
15 15
 use function GuzzleHttp\Psr7\stream_for;
16 16
 
17 17
 class CrawlRequestFulfilled
Please login to merge, or discard this patch.
src/CrawlQueue/ArrayCrawlQueue.php 1 patch
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@
 block discarded – undo
2 2
 
3 3
 namespace Spatie\Crawler\CrawlQueue;
4 4
 
5
-use TypeError;
6
-use Spatie\Crawler\CrawlUrl;
7 5
 use Psr\Http\Message\UriInterface;
6
+use Spatie\Crawler\CrawlUrl;
8 7
 use Spatie\Crawler\Exception\UrlNotFoundByIndex;
8
+use TypeError;
9 9
 
10 10
 /**
11 11
  * Crawl queue implemented with arrays.
Please login to merge, or discard this patch.