Migrate to constructor promoted properties

This commit is contained in:
Yassine Guedidi
2025-04-05 13:54:27 +02:00
parent 4168727f36
commit 1d5674a230
85 changed files with 441 additions and 854 deletions

View File

@ -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)

View File

@ -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]);
}