mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +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
|
@ -17,26 +17,19 @@ use Wallabag\Tools\Utils;
|
|||
*/
|
||||
class ContentProxy
|
||||
{
|
||||
protected $graby;
|
||||
protected $tagger;
|
||||
protected $ignoreOriginProcessor;
|
||||
protected $validator;
|
||||
protected $logger;
|
||||
protected $mimeTypes;
|
||||
protected $fetchingErrorMessage;
|
||||
protected $eventDispatcher;
|
||||
protected $storeArticleHeaders;
|
||||
|
||||
public function __construct(Graby $graby, RuleBasedTagger $tagger, RuleBasedIgnoreOriginProcessor $ignoreOriginProcessor, ValidatorInterface $validator, LoggerInterface $logger, $fetchingErrorMessage, $storeArticleHeaders = false)
|
||||
{
|
||||
$this->graby = $graby;
|
||||
$this->tagger = $tagger;
|
||||
$this->ignoreOriginProcessor = $ignoreOriginProcessor;
|
||||
$this->validator = $validator;
|
||||
$this->logger = $logger;
|
||||
public function __construct(
|
||||
protected Graby $graby,
|
||||
protected RuleBasedTagger $tagger,
|
||||
protected RuleBasedIgnoreOriginProcessor $ignoreOriginProcessor,
|
||||
protected ValidatorInterface $validator,
|
||||
protected LoggerInterface $logger,
|
||||
protected $fetchingErrorMessage,
|
||||
protected $storeArticleHeaders = false,
|
||||
) {
|
||||
$this->mimeTypes = new MimeTypes();
|
||||
$this->fetchingErrorMessage = $fetchingErrorMessage;
|
||||
$this->storeArticleHeaders = $storeArticleHeaders;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -107,7 +100,9 @@ class ContentProxy
|
|||
return;
|
||||
}
|
||||
|
||||
$this->logger->warning('Language validation failed. ' . (string) $errors);
|
||||
foreach ($errors as $error) {
|
||||
$this->logger->warning('Language validation failed. ' . $error->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -128,7 +123,9 @@ class ContentProxy
|
|||
return;
|
||||
}
|
||||
|
||||
$this->logger->warning('PreviewPicture validation failed. ' . (string) $errors);
|
||||
foreach ($errors as $error) {
|
||||
$this->logger->warning('PreviewPicture validation failed. ' . $error->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue