forked from wallabag/wallabag
Migrate to constructor promoted properties
This commit is contained in:
@ -9,35 +9,15 @@ use Wallabag\Repository\SiteCredentialRepository;
|
||||
|
||||
class GrabySiteConfigBuilder implements SiteConfigBuilder
|
||||
{
|
||||
/**
|
||||
* @var ConfigBuilder
|
||||
*/
|
||||
private $grabyConfigBuilder;
|
||||
|
||||
/**
|
||||
* @var SiteCredentialRepository
|
||||
*/
|
||||
private $credentialRepository;
|
||||
|
||||
/**
|
||||
* @var LoggerInterface
|
||||
*/
|
||||
private $logger;
|
||||
|
||||
/**
|
||||
* @var TokenStorageInterface
|
||||
*/
|
||||
private $token;
|
||||
|
||||
/**
|
||||
* GrabySiteConfigBuilder constructor.
|
||||
*/
|
||||
public function __construct(ConfigBuilder $grabyConfigBuilder, TokenStorageInterface $token, SiteCredentialRepository $credentialRepository, LoggerInterface $logger)
|
||||
{
|
||||
$this->grabyConfigBuilder = $grabyConfigBuilder;
|
||||
$this->credentialRepository = $credentialRepository;
|
||||
$this->logger = $logger;
|
||||
$this->token = $token;
|
||||
public function __construct(
|
||||
private ConfigBuilder $grabyConfigBuilder,
|
||||
private TokenStorageInterface $token,
|
||||
private SiteCredentialRepository $credentialRepository,
|
||||
private LoggerInterface $logger,
|
||||
) {
|
||||
}
|
||||
|
||||
public function buildForHost($host)
|
||||
|
||||
@ -9,12 +9,12 @@ use Wallabag\ExpressionLanguage\AuthenticatorProvider;
|
||||
|
||||
class LoginFormAuthenticator
|
||||
{
|
||||
private HttpBrowser $browser;
|
||||
private ExpressionLanguage $expressionLanguage;
|
||||
|
||||
public function __construct(HttpBrowser $browser, AuthenticatorProvider $authenticatorProvider)
|
||||
{
|
||||
$this->browser = $browser;
|
||||
public function __construct(
|
||||
private HttpBrowser $browser,
|
||||
AuthenticatorProvider $authenticatorProvider,
|
||||
) {
|
||||
$this->expressionLanguage = new ExpressionLanguage(null, [$authenticatorProvider]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user