Total Complexity | 3 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Coverage | 85.71% |
Changes | 0 |
1 | <?php |
||
18 | class MailController extends Controller |
||
19 | { |
||
20 | public $defaultAction = 'flush'; |
||
21 | /** |
||
22 | * @var Mailer|array|string the mailer object or the application component ID of the mailer object. |
||
23 | */ |
||
24 | public $mailer = 'mailer'; |
||
25 | |||
26 | /** |
||
27 | * @inheritdoc |
||
28 | */ |
||
29 | 1 | public function beforeAction($action) |
|
30 | { |
||
31 | 1 | if (!parent::beforeAction($action)) { |
|
32 | return false; |
||
33 | } |
||
34 | 1 | $this->mailer = Instance::ensure($this->mailer, Mailer::class); |
|
35 | |||
36 | 1 | return true; |
|
37 | } |
||
38 | |||
39 | /** |
||
40 | * Sends messages. |
||
41 | */ |
||
42 | 1 | public function actionFlush() |
|
45 | 1 | } |
|
46 | } |
||
47 |