TranslationText   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 80
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 71.43%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 80
ccs 10
cts 14
cp 0.7143
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getTitle() 0 4 1
A setTitle() 0 6 1
A getDescription() 0 4 1
A setDescription() 0 6 1
1
<?php
2
3
namespace Speicher210\Fastbill\Api\Model;
4
5
use JMS\Serializer\Annotation as JMS;
6
7
/**
8
 * The translation text.
9
 */
10
class TranslationText
11
{
12
    /**
13
     * The translation title.
14
     *
15
     * @var string
16
     *
17
     * @JMS\Type("string")
18
     * @JMS\SerializedName("TITLE")
19
     */
20
    protected $title;
21
22
    /**
23
     * The translation description.
24
     *
25
     * @var string
26
     *
27
     * @JMS\Type("string")
28
     * @JMS\SerializedName("DESCRIPTION")
29
     */
30
    protected $description;
31
32
    /**
33
     * Constructor.
34
     *
35
     * @param string $title The title.
36
     * @param string $description The description.
37
     */
38 6
    public function __construct($title, $description)
39
    {
40 6
        $this->setTitle($title);
41 6
        $this->setDescription($description);
42 6
    }
43
44
    /**
45
     * Get the title.
46
     *
47
     * @return string
48
     */
49
    public function getTitle()
50
    {
51
        return $this->title;
52
    }
53
54
    /**
55
     * Set the title.
56
     *
57
     * @param string $title The title.
58
     * @return TranslationText
59
     */
60 6
    public function setTitle($title)
61
    {
62 6
        $this->title = $title;
63
64 6
        return $this;
65
    }
66
67
    /**
68
     * Get the description.
69
     *
70
     * @return string
71
     */
72
    public function getDescription()
73
    {
74
        return $this->description;
75
    }
76
77
    /**
78
     * Set the description.
79
     *
80
     * @param string $description The description.
81
     * @return TranslationText
82
     */
83 6
    public function setDescription($description)
84
    {
85 6
        $this->description = $description;
86
87 6
        return $this;
88
    }
89
}
90