| Total Complexity | 5 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | class ConfirmEmailTask extends AbstractTask |
||
| 17 | { |
||
| 18 | /** @var bool */ |
||
| 19 | private $isMandatory; |
||
| 20 | |||
| 21 | /** @var TaskTargetInterface */ |
||
| 22 | private $target; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * ConfirmEmailTask constructor. |
||
| 26 | * @param TaskTargetInterface $target |
||
| 27 | * @param bool $mandatory |
||
| 28 | */ |
||
| 29 | public function __construct(TaskTargetInterface $target, $mandatory = false) |
||
| 30 | { |
||
| 31 | $this->target = $target; |
||
| 32 | $this->isMandatory = $mandatory; |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Returns a value that can be used to identify a task. This is used to avoid repeated Tasks in the TaskStack. |
||
| 37 | * |
||
| 38 | * If a Task is specific to a given RP this method could return something like {TASK_NAME}_{RP_ID} |
||
| 39 | * |
||
| 40 | * @return string |
||
| 41 | */ |
||
| 42 | public function getId() |
||
| 43 | { |
||
| 44 | return 'lc.task.confirm_email'; |
||
| 45 | } |
||
| 46 | |||
| 47 | public function getRoutes() |
||
| 48 | { |
||
| 49 | return [ |
||
| 50 | 'task_confirm_email', |
||
| 51 | 'fos_user_registration_confirm', |
||
| 52 | 'wait_valid_email', |
||
| 53 | ]; |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @return boolean |
||
| 58 | */ |
||
| 59 | public function isMandatory() |
||
| 62 | } |
||
| 63 | |||
| 64 | /** |
||
| 65 | * @return TaskTargetInterface |
||
| 66 | */ |
||
| 67 | public function getTarget() |
||
| 70 | } |
||
| 71 | } |
||
| 72 |