| Total Complexity | 4 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | class PasswordResetBatchElement extends BatchElement |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | private $userModel; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var EventDispatcherInterface |
||
| 29 | */ |
||
| 30 | private $eventDispatcher; |
||
| 31 | |||
| 32 | public function __construct(array $options, string $userModel, EventDispatcherInterface $eventDispatcher) |
||
| 33 | { |
||
| 34 | parent::__construct($options); |
||
| 35 | |||
| 36 | $this->userModel = $userModel; |
||
| 37 | $this->eventDispatcher = $eventDispatcher; |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @param ResettablePasswordInterface $object |
||
| 42 | */ |
||
| 43 | public function apply($object): void |
||
| 44 | { |
||
| 45 | $this->eventDispatcher->dispatch( |
||
| 46 | AdminSecurityEvents::RESET_PASSWORD_REQUEST, |
||
|
|
|||
| 47 | new ResetPasswordRequestEvent($object) |
||
| 48 | ); |
||
| 49 | } |
||
| 50 | |||
| 51 | public function getId(): string |
||
| 54 | } |
||
| 55 | |||
| 56 | public function getClassName(): string |
||
| 59 | } |
||
| 60 | } |
||
| 61 |