Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
Some property promotion
Browse files Browse the repository at this point in the history
  • Loading branch information
theUniC committed Apr 3, 2021
1 parent c801da5 commit 5670007
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 22 deletions.
8 changes: 3 additions & 5 deletions Validator/AuthorizationValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@

class AuthorizationValidator extends ConstraintValidator
{
protected AuthorizerInterface $authorizer;

public function __construct(AuthorizerInterface $authorizer)
{
$this->authorizer = $authorizer;
public function __construct(
protected AuthorizerInterface $authorizer
) {
}

/**
Expand Down
11 changes: 4 additions & 7 deletions Validator/ReplyAuthorizationValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@

class ReplyAuthorizationValidator extends ConstraintValidator
{
protected AuthorizerInterface $authorizer;
protected ParticipantProviderInterface $participantProvider;

public function __construct(AuthorizerInterface $authorizer, ParticipantProviderInterface $participantProvider)
{
$this->authorizer = $authorizer;
$this->participantProvider = $participantProvider;
public function __construct(
protected AuthorizerInterface $authorizer,
protected ParticipantProviderInterface $participantProvider
) {
}

/**
Expand Down
8 changes: 3 additions & 5 deletions Validator/SelfRecipientValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@

class SelfRecipientValidator extends ConstraintValidator
{
protected ParticipantProviderInterface $participantProvider;

public function __construct(ParticipantProviderInterface $participantProvider)
{
$this->participantProvider = $participantProvider;
public function __construct(
protected ParticipantProviderInterface $participantProvider
) {
}

/**
Expand Down
8 changes: 3 additions & 5 deletions Validator/SpamValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@

class SpamValidator extends ConstraintValidator
{
protected SpamDetectorInterface $spamDetector;

public function __construct(SpamDetectorInterface $spamDetector)
{
$this->spamDetector = $spamDetector;
public function __construct(
protected SpamDetectorInterface $spamDetector
) {
}

/**
Expand Down

0 comments on commit 5670007

Please sign in to comment.