mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-11 17:51:02 +00:00
Migrate to constructor promoted properties
This commit is contained in:
parent
4168727f36
commit
1d5674a230
85 changed files with 441 additions and 854 deletions
|
@ -14,19 +14,13 @@ use Wallabag\SiteConfig\SiteConfigBuilder;
|
|||
|
||||
class Authenticator implements LoggerAwareInterface
|
||||
{
|
||||
/** @var SiteConfigBuilder */
|
||||
private $configBuilder;
|
||||
|
||||
/** @var LoginFormAuthenticator */
|
||||
private $authenticator;
|
||||
|
||||
/** @var LoggerInterface */
|
||||
private $logger;
|
||||
|
||||
public function __construct(SiteConfigBuilder $configBuilder, LoginFormAuthenticator $authenticator)
|
||||
{
|
||||
$this->configBuilder = $configBuilder;
|
||||
$this->authenticator = $authenticator;
|
||||
public function __construct(
|
||||
private SiteConfigBuilder $configBuilder,
|
||||
private LoginFormAuthenticator $authenticator,
|
||||
) {
|
||||
$this->logger = new NullLogger();
|
||||
}
|
||||
|
||||
|
|
|
@ -11,19 +11,14 @@ use Symfony\Contracts\HttpClient\ResponseStreamInterface;
|
|||
|
||||
class WallabagClient implements HttpClientInterface
|
||||
{
|
||||
private $restrictedAccess;
|
||||
private HttpClientInterface $httpClient;
|
||||
private HttpBrowser $browser;
|
||||
private Authenticator $authenticator;
|
||||
private LoggerInterface $logger;
|
||||
|
||||
public function __construct($restrictedAccess, HttpBrowser $browser, Authenticator $authenticator, LoggerInterface $logger)
|
||||
{
|
||||
$this->restrictedAccess = $restrictedAccess;
|
||||
$this->browser = $browser;
|
||||
$this->authenticator = $authenticator;
|
||||
$this->logger = $logger;
|
||||
|
||||
public function __construct(
|
||||
private $restrictedAccess,
|
||||
private HttpBrowser $browser,
|
||||
private Authenticator $authenticator,
|
||||
private LoggerInterface $logger,
|
||||
) {
|
||||
$this->httpClient = HttpClient::create([
|
||||
'timeout' => 10,
|
||||
]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue