1 | <?php |
||
13 | class TestMailCommand extends Command |
||
14 | { |
||
15 | /** |
||
16 | * The name and signature of the console command. |
||
17 | * |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $signature = 'mail:test {recipient?} {--preset=} {--queue} {--driver=} {--connection=} {--stack=}'; |
||
21 | |||
22 | /** |
||
23 | * The console command description. |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $description = 'Send a test email'; |
||
28 | |||
29 | protected $validator; |
||
30 | protected $config; |
||
31 | |||
32 | protected $preset; |
||
33 | protected $recipient; |
||
34 | protected $driver; |
||
35 | protected $stack; |
||
36 | protected $connection; |
||
37 | |||
38 | /** |
||
39 | * Create a new command instance. |
||
40 | * |
||
41 | * @return void |
||
|
|||
42 | */ |
||
43 | public function __construct(Validator $validator, Config $config) |
||
49 | |||
50 | /** |
||
51 | * Execute the console command. |
||
52 | * |
||
53 | * @return mixed |
||
54 | */ |
||
55 | public function handle() |
||
83 | |||
84 | protected function setArgumentDefaults() |
||
92 | |||
93 | protected function getPresetValue($key, $default = null) |
||
100 | |||
101 | protected function getConfigPath() |
||
105 | |||
106 | protected function getConfigKeys() |
||
112 | |||
113 | protected function setPreset() |
||
117 | |||
118 | protected function setRecipient() |
||
123 | |||
124 | protected function setDriver() |
||
129 | |||
130 | protected function setConnection() |
||
135 | |||
136 | protected function setStack() |
||
140 | |||
141 | protected function isOnQueue(): bool |
||
145 | |||
146 | protected function hasQueueOptions() |
||
150 | |||
151 | protected function hasQueuePresets() |
||
155 | |||
156 | protected function rules(): array |
||
164 | } |
||
165 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.