Skip to content

Commit

Permalink
some small refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
msalakhov committed Apr 12, 2022
1 parent c32ebf6 commit 96975a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
13 changes: 1 addition & 12 deletions app/src/Command/SendRemindersCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,9 @@ class SendRemindersCommand extends Command implements ContainerAwareInterface, L
use ContainerAwareTrait;
use LoggerAwareTrait;

/**
* @var MailerInterface
*/
private $mailer;
/**
* @var EntityManagerInterface
*/
private $entityManager;

public function __construct(MailerInterface $mailer, EntityManagerInterface $entityManager)
public function __construct(private MailerInterface $mailer, private EntityManagerInterface $entityManager)
{
parent::__construct();
$this->mailer = $mailer;
$this->entityManager = $entityManager;
}

protected function configure()
Expand Down
7 changes: 1 addition & 6 deletions app/src/DataFixtures/UserFixtures.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,14 @@

use App\Entity\User;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\Persistence\ObjectManager;
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;

class UserFixtures extends Fixture
{
public const USER_REFERENCE = 'user';
private UserPasswordHasherInterface $hasher;

public function __construct(UserPasswordHasherInterface $hasher, EntityManagerInterface $entityManager)
{
$this->hasher = $hasher;
}
public function __construct(private UserPasswordHasherInterface $hasher) {}

public function load(ObjectManager $manager)
{
Expand Down

0 comments on commit 96975a4

Please sign in to comment.