MemorySpool   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 14
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 9 1
1
<?php
2
/**
3
 * @link https://github.com/Izumi-kun/yii2-spoolmailer
4
 * @copyright Copyright (c) 2017 Viktor Khokhryakov
5
 * @license http://opensource.org/licenses/BSD-3-Clause
6
 */
7
8
namespace izumi\spoolmailer\spools;
9
10
use Swift_MemorySpool;
11
use Swift_SpoolTransport;
12
13
/**
14
 * Stores Messages in memory.
15
 *
16
 * @author Viktor Khokhryakov <[email protected]>
17
 */
18
class MemorySpool extends BaseSpool
19
{
20
    /**
21
     * @inheritdoc
22
     */
23 3
    public function init()
24
    {
25 3
        parent::init();
26 3
        $this->setTransport([
27 3
            'class' => Swift_SpoolTransport::class,
28
            'constructArgs' => [
29
                [
30
                    'class' => Swift_MemorySpool::class,
31
                    'constructArgs' => [],
32
                ],
33
            ],
34
        ]);
35 3
    }
36
}
37