File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1414class Crawler extends \Embed \Http \Crawler implements ClientInterface, RequestFactoryInterface, UriFactoryInterface
1515{
1616 protected RequestFactoryInterface $ requestFactory ;
17+
1718 protected UriFactoryInterface $ uriFactory ;
19+
1820 protected ClientInterface $ client ;
21+
1922 protected array $ defaultHeaders = [
2023 'User-Agent ' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:73.0) Gecko/20100101 Firefox/73.0 ' ,
2124 'Cache-Control ' => 'max-age=0 ' ,
2225 ];
2326
2427 public function __construct (?ClientInterface $ client = null , ?RequestFactoryInterface $ requestFactory = null , ?UriFactoryInterface $ uriFactory = null )
2528 {
26- $ this ->client = $ client ?: new CurlClient () ;
29+ $ this ->client = $ client ?: new CurlClient ;
2730 $ this ->requestFactory = $ requestFactory ?: FactoryDiscovery::getRequestFactory ();
2831 $ this ->uriFactory = $ uriFactory ?: FactoryDiscovery::getUriFactory ();
2932 }
@@ -34,7 +37,7 @@ public function addDefaultHeaders(array $headers): void
3437 }
3538
3639 /**
37- * @param UriInterface|string $uri The URI associated with the request.
40+ * @param UriInterface|string $uri The URI associated with the request.
3841 */
3942 public function createRequest (string $ method , $ uri ): RequestInterface
4043 {
@@ -79,4 +82,4 @@ public function getResponseUri(ResponseInterface $response): ?UriInterface
7982
8083 return $ location ? $ this ->uriFactory ->createUri ($ location ) : null ;
8184 }
82- }
85+ }
You can’t perform that action at this time.
0 commit comments