Skip to content

Commit ec33375

Browse files
committed
Set default user agent
1 parent b4c3054 commit ec33375

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/FeedIo/Adapter/Client.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,9 @@
1212
class Client implements ClientInterface
1313
{
1414
public const DEFAULT_USER_AGENT = 'Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1';
15-
private PsrClientInterface $client;
16-
private string $userAgent;
1715

18-
public function __construct(PsrClientInterface $client, string $userAgent)
16+
public function __construct(private PsrClientInterface $client, private string $userAgent = self::DEFAULT_USER_AGENT)
1917
{
20-
$this->client = $client;
21-
$this->userAgent = $userAgent;
2218
}
2319

2420
/**

0 commit comments

Comments
 (0)