Total Complexity | 3 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class NotificationService |
||
11 | { |
||
12 | |||
13 | /** |
||
14 | * Send an email when the contact form is submitted |
||
15 | * |
||
16 | * @param array $data |
||
17 | * @param int $userId |
||
18 | * |
||
19 | * @return bool |
||
20 | */ |
||
21 | public function sendEmailContactMe(array $data, int $userId): bool |
||
22 | { |
||
23 | $user = User::find($userId); |
||
24 | $user->notify(new ContactMeMailNotification($data)); |
||
25 | |||
26 | return true; |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * Send an email when the get a treatment form is submitted |
||
31 | * |
||
32 | * @param array $data |
||
33 | * @param int $userId |
||
34 | * |
||
35 | * @return bool |
||
36 | */ |
||
37 | public function sendEmailGetATreatment(array $data, int $userId): bool |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * Send an email when the new testimonial form is submitted |
||
47 | * |
||
48 | * @param array $data |
||
49 | * @param int $userId |
||
50 | * |
||
51 | * @return bool |
||
52 | */ |
||
53 | public function sendEmailNewTestimonial(array $data, int $userId): bool |
||
62 |