Migrated all constructor props to property promotion when possible

This commit is contained in:
Alejandro Celaya
2021-05-23 11:57:31 +02:00
parent 4b5fa6ddad
commit e0f0bb5523
118 changed files with 237 additions and 713 deletions

View File

@@ -24,28 +24,15 @@ use function Functional\partial_left;
class NotifyVisitToWebHooks
{
private ClientInterface $httpClient;
private EntityManagerInterface $em;
private LoggerInterface $logger;
/** @var string[] */
private array $webhooks;
private DataTransformerInterface $transformer;
private AppOptions $appOptions;
public function __construct(
ClientInterface $httpClient,
EntityManagerInterface $em,
LoggerInterface $logger,
array $webhooks,
DataTransformerInterface $transformer,
AppOptions $appOptions
private ClientInterface $httpClient,
private EntityManagerInterface $em,
private LoggerInterface $logger,
/** @var string[] */
private array $webhooks,
private DataTransformerInterface $transformer,
private AppOptions $appOptions
) {
$this->httpClient = $httpClient;
$this->em = $em;
$this->logger = $logger;
$this->webhooks = $webhooks;
$this->transformer = $transformer;
$this->appOptions = $appOptions;
}
public function __invoke(VisitLocated $shortUrlLocated): void