Conditions | 4 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
22 | 127 | public function notify(TestResult $result) |
|
23 | { |
||
24 | 127 | if ($this->config['enabled'] === false) { |
|
25 | 1 | return; |
|
26 | } |
||
27 | |||
28 | 127 | $recipients = []; |
|
29 | |||
30 | 127 | foreach ($result->getTest()->getGroup()->getUsers() as $user) { |
|
31 | 8 | if ($user->shouldBeAlerted($result)) { |
|
32 | 8 | $recipients[] = $user->getEmail(); |
|
33 | 8 | } |
|
34 | 127 | } |
|
35 | |||
36 | 127 | $this->sendEmail($result, $recipients); |
|
37 | 127 | } |
|
38 | |||
57 |