Skip to content

Commit 8c8fbf0

Browse files
committed
Pass NullClient to facade
1 parent 958af40 commit 8c8fbf0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/FeedIo/FeedIo.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use DateTime;
88
use FeedIo\Adapter\ClientInterface;
9+
use FeedIo\Adapter\NullClient;
910
use FeedIo\Http\ResponseBuilder;
1011
use FeedIo\Reader\Result;
1112
use FeedIo\Rule\DateTimeBuilderInterface;
@@ -66,13 +67,10 @@ class FeedIo
6667
protected Reader $reader;
6768

6869
public function __construct(
69-
protected ?ClientInterface $client = null,
70+
protected ClientInterface $client = new NullClient(),
7071
protected LoggerInterface $logger = new NullLogger(),
7172
protected ?SpecificationInterface $specification = null,
7273
) {
73-
if (is_null($client)) {
74-
throw new \Exception('You must provide an instance of FeedIo\Adapter\ClientInterface');
75-
}
7674
if (is_null($this->specification)) {
7775
$this->specification = new Specification($this->logger);
7876
}

0 commit comments

Comments
 (0)