Completed
Push — master ( 3793ef...96584a )
by WEBEWEB
06:26
created

SwiftMailerTrait::setSwiftMailer()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
/**
4
 * This file is part of the core-bundle package.
5
 *
6
 * (c) 2018 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\CoreBundle\Service;
13
14
use Swift_Mailer;
15
16
/**
17
 * Swift mailer trait.
18
 *
19
 * @author webeweb <https://github.com/webeweb/>
20
 * @package WBW\Bundle\CoreBundle\Service
21
 */
22
trait SwiftMailerTrait {
23
24
    /**
25
     * Swift mailer.
26
     *
27
     * @var Swift_Mailer
28
     */
29
    private $swiftMailer;
30
31
    /**
32
     * Get the swift mailer.
33
     *
34
     * @return Swift_Mailer Returns the swift mailer.
35
     */
36
    public function getSwiftMailer() {
37
        return $this->swiftMailer;
38
    }
39
40
    /**
41
     * Set the swift mailer.
42
     *
43
     * @param Swift_Mailer $swiftMailer The swift mailer.
44
     */
45
    protected function setSwiftMailer(Swift_Mailer $swiftMailer = null) {
46
        $this->swiftMailer = $swiftMailer;
47
        return $this;
48
    }
49
50
}
51