Total Complexity | 7 |
Total Lines | 50 |
Duplicated Lines | 0 % |
Coverage | 39.13% |
Changes | 0 |
1 | <?php |
||
9 | class StuMail implements StuMailInterface |
||
10 | { |
||
11 | 1 | public function __construct( |
|
12 | private Email $email, |
||
13 | private MailerInterface $mailer, |
||
14 | private StuConfigInterface $stuConfig |
||
15 | 1 | ) {} |
|
16 | |||
17 | 1 | public function withDefaultSender(): StuMailInterface |
|
18 | { |
||
19 | 1 | $this->email->from($this |
|
20 | 1 | ->stuConfig |
|
21 | 1 | ->getGameSettings() |
|
22 | 1 | ->getEmailSettings() |
|
23 | 1 | ->getSenderAddress()); |
|
24 | |||
25 | 1 | return $this; |
|
26 | } |
||
27 | |||
28 | public function setFrom(string $from): StuMailInterface |
||
29 | { |
||
30 | $this->email->from($from); |
||
31 | |||
32 | return $this; |
||
33 | } |
||
34 | |||
35 | public function addTo(string $to): StuMailInterface |
||
36 | { |
||
37 | $this->email->to($to); |
||
38 | |||
39 | return $this; |
||
40 | } |
||
41 | |||
42 | public function setSubject(string $subject): StuMailInterface |
||
43 | { |
||
44 | $this->email->subject($subject); |
||
45 | |||
46 | return $this; |
||
47 | } |
||
48 | |||
49 | public function setBody(string $text): StuMailInterface |
||
50 | { |
||
51 | $this->email->text($text); |
||
52 | |||
53 | return $this; |
||
54 | } |
||
55 | |||
56 | public function send(): void |
||
59 | } |
||
60 | } |
||
61 |