Mailer::send()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Tworzenieweb\SqlProvisioner\Service;
4
5
use Swift_Mailer;
6
use Swift_Message;
7
8
class Mailer
9
{
10
    /** @var Swift_Mailer  */
11
    private $mailer;
12
13
14
    public function __construct(Swift_Mailer $mailer)
15
    {
16
        $this->mailer = $mailer;
17
    }
18
19
20
    public function send(Swift_Message $message): bool
21
    {
22
        $numberOfEmailsSent = $this->mailer->send($message);
23
24
        return $numberOfEmailsSent > 0;
25
    }
26
}
27