mirror of
https://github.com/symfony/scheduler.git
synced 2026-03-24 00:02:18 +01:00
Move properties above __construct() method
This commit is contained in:
10
Schedule.php
10
Schedule.php
@@ -21,11 +21,6 @@ use Symfony\Contracts\Cache\CacheInterface;
|
||||
|
||||
final class Schedule implements ScheduleProviderInterface
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ?EventDispatcherInterface $dispatcher = null,
|
||||
) {
|
||||
}
|
||||
|
||||
/** @var array<string,RecurringMessage> */
|
||||
private array $messages = [];
|
||||
private ?LockInterface $lock = null;
|
||||
@@ -33,6 +28,11 @@ final class Schedule implements ScheduleProviderInterface
|
||||
private bool $shouldRestart = false;
|
||||
private bool $onlyLastMissed = false;
|
||||
|
||||
public function __construct(
|
||||
private readonly ?EventDispatcherInterface $dispatcher = null,
|
||||
) {
|
||||
}
|
||||
|
||||
public function with(RecurringMessage $message, RecurringMessage ...$messages): static
|
||||
{
|
||||
return static::doAdd(new self($this->dispatcher), $message, ...$messages);
|
||||
|
||||
Reference in New Issue
Block a user