mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-30 02:25:00 +00:00
DX: apply rector rules up to php8.0
This commit is contained in:
@@ -26,17 +26,8 @@ class ShortMessage
|
||||
|
||||
public const PRIORITY_MEDIUM = 'medium';
|
||||
|
||||
private string $content;
|
||||
|
||||
private PhoneNumber $phoneNumber;
|
||||
|
||||
private string $priority = 'low';
|
||||
|
||||
public function __construct(string $content, PhoneNumber $phoneNumber, string $priority = 'low')
|
||||
public function __construct(private string $content, private PhoneNumber $phoneNumber, private string $priority = 'low')
|
||||
{
|
||||
$this->content = $content;
|
||||
$this->phoneNumber = $phoneNumber;
|
||||
$this->priority = $priority;
|
||||
}
|
||||
|
||||
public function getContent(): string
|
||||
|
@@ -25,11 +25,8 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
|
||||
*/
|
||||
class ShortMessageHandler implements MessageHandlerInterface
|
||||
{
|
||||
private ShortMessageTransporterInterface $messageTransporter;
|
||||
|
||||
public function __construct(ShortMessageTransporterInterface $messageTransporter)
|
||||
public function __construct(private ShortMessageTransporterInterface $messageTransporter)
|
||||
{
|
||||
$this->messageTransporter = $messageTransporter;
|
||||
}
|
||||
|
||||
public function __invoke(ShortMessage $message): void
|
||||
|
@@ -20,12 +20,8 @@ namespace Chill\MainBundle\Service\ShortMessage;
|
||||
|
||||
class ShortMessageTransporter implements ShortMessageTransporterInterface
|
||||
{
|
||||
private ShortMessageSenderInterface $sender;
|
||||
|
||||
public function __construct(
|
||||
ShortMessageSenderInterface $sender // hint: must remain at place 0 for DI
|
||||
) {
|
||||
$this->sender = $sender;
|
||||
public function __construct(private ShortMessageSenderInterface $sender)
|
||||
{
|
||||
}
|
||||
|
||||
public function send(ShortMessage $shortMessage): void
|
||||
|
Reference in New Issue
Block a user