File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ class Mailer extends CakeMailer {
20
20
* Message class name.
21
21
*
22
22
* @var string
23
+ * @psalm-var class-string<\Cake\Mailer\Message>
23
24
*/
24
25
protected $ messageClass = Message::class;
25
26
Original file line number Diff line number Diff line change @@ -29,20 +29,16 @@ public function __construct(?array $config = null) {
29
29
if ($ xMailer ) {
30
30
$ this ->addHeaders (['X-Mailer ' => $ xMailer ]);
31
31
}
32
+
33
+ $ this ->setDefaults ();
32
34
}
33
35
34
36
/**
35
37
* Overwrite to allow custom enhancements
36
38
*
37
- * @param array|string $config
38
- * @return $this
39
+ * @return void
39
40
*/
40
- public function _setProfile ($ config ) {
41
- if (!is_array ($ config )) {
42
- $ config = (string )$ config ;
43
- }
44
- //$this->_applyConfig($config);
45
-
41
+ protected function setDefaults (): void {
46
42
$ fromEmail = Configure::read ('Config.systemEmail ' );
47
43
if ($ fromEmail ) {
48
44
$ fromName = Configure::read ('Config.systemName ' );
@@ -51,10 +47,8 @@ public function _setProfile($config) {
51
47
$ fromName = Configure::read ('Config.adminName ' );
52
48
}
53
49
if ($ fromEmail ) {
54
- // $this->setFrom($fromEmail, $fromName);
50
+ $ this ->setFrom ($ fromEmail , $ fromName );
55
51
}
56
-
57
- return $ this ;
58
52
}
59
53
60
54
/**
You can’t perform that action at this time.
0 commit comments