Completed
Push — master ( f7bed6...7b8b9a )
by Gabriel
05:48 queued 11s
created

Message   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 1

Test Coverage

Coverage 31.25%

Importance

Changes 0
Metric Value
dl 0
loc 55
rs 10
c 0
b 0
f 0
ccs 5
cts 16
cp 0.3125
wmc 6
lcom 2
cbo 1

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setMergeTags() 0 4 1
A getMergeTags() 0 4 1
A addMergeTag() 0 4 1
A getCustomArgs() 0 4 1
A setCustomArgs() 0 4 1
A addCustomArg() 0 4 1
1
<?php
2
3
namespace Nip\Mail;
4
5
use Swift_Message;
6
use Swift_Mime_Message;
7
8
/**
9
 * Class Message
10
 * @package Nip\Mail
11
 */
12
class Message extends Swift_Message implements Swift_Mime_Message
13
{
14
    protected $mergeTags = [];
15
    protected $custom_args = [];
16
17
    /**
18
     * @return array
19
     */
20 1
    public function getMergeTags()
21
    {
22 1
        return $this->mergeTags;
23
    }
24
25
    /**
26
     * @param array $mergeTags
27
     */
28
    public function setMergeTags($mergeTags)
29
    {
30
        $this->mergeTags = $mergeTags;
31
    }
32
33
    /**
34
     * @param $name
35
     * @param $value
36
     */
37 1
    public function addMergeTag($name, $value)
38
    {
39 1
        $this->mergeTags[$name] = $value;
40 1
    }
41
42
    /**
43
     * @return array
44
     */
45
    public function getCustomArgs()
46
    {
47
        return $this->custom_args;
48
    }
49
50
    /**
51
     * @param array $custom_args
52
     */
53
    public function setCustomArgs($custom_args)
54
    {
55
        $this->custom_args = $custom_args;
56
    }
57
58
    /**
59
     * @param $key
60
     * @param $value
61
     */
62
    public function addCustomArg($key, $value)
63
    {
64
        $this->custom_args[$key] = $value;
65
    }
66
}
67