Passed
Push — master ( 7149fc...8a2723 )
by Gabriel
01:48
created

HasMergeArgsTrait::addCustomArg()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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