HasMergeArgsTrait::getCustomArgs()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 3
rs 10
ccs 1
cts 1
cp 1
crap 1
1
<?php
2
3
namespace Nip\Mail\Message;
4
5
/**
6
 * Trait HasMergeArgsTrait.
7
 */
8
trait HasMergeArgsTrait
9
{
10
    protected $mergeTags = [];
11
12
    protected $customArgs = [];
13
14
    /**
15
     * @return array
16
     */
17
    public function getMergeTags()
18 2
    {
19
        return $this->mergeTags;
20 2
    }
21
22
    /**
23
     * @param array $mergeTags
24
     */
25
    public function setMergeTags($mergeTags)
26
    {
27
        $this->mergeTags = $mergeTags;
28
    }
29
30
    /**
31
     * @param $name
32
     * @param $value
33
     */
34
    public function addMergeTag($name, $value)
35 1
    {
36
        $this->mergeTags[$name] = $value;
37 1
    }
38 1
39
    /**
40
     * @return array
41
     */
42
    public function getCustomArgs()
43 1
    {
44
        return $this->customArgs;
45 1
    }
46
47
    /**
48
     * @param array $customArgs
49
     */
50
    public function setCustomArgs($customArgs)
51
    {
52
        $this->customArgs = $customArgs;
53
    }
54
55
    /**
56
     * @param $key
57
     * @param $value
58
     */
59
    public function addCustomArg($key, $value)
60
    {
61
        $this->customArgs[$key] = $value;
62
    }
63
}
64