Category   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 75
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 0
dl 0
loc 75
ccs 15
cts 15
cp 1
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getTerm() 0 4 1
A setTerm() 0 6 1
A getScheme() 0 4 1
A setScheme() 0 6 1
A getLabel() 0 4 1
A setLabel() 0 6 1
1
<?php declare(strict_types=1);
2
/*
3
 * This file is part of the feed-io package.
4
 *
5
 * (c) Alexandre Debril <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace FeedIo\Feed\Node;
12
13
class Category implements CategoryInterface
14
{
15
16
    /**
17
     * @var string
18
     */
19
    protected $term;
20
21
    /**
22
     * @var string
23
     */
24
    protected $scheme;
25
26
    /**
27
     * @var string
28
     */
29
    protected $label;
30
31
    /**
32
     * @return null|string
33
     */
34 13
    public function getTerm() : ? string
35
    {
36 13
        return $this->term;
37
    }
38
39
    /**
40
     * @param  string $term
41
     * @return CategoryInterface
42
     */
43 14
    public function setTerm(string $term = null) : CategoryInterface
44
    {
45 14
        $this->term = $term;
46
47 14
        return $this;
48
    }
49
50
    /**
51
     * @return null|string
52
     */
53 9
    public function getScheme() : ? string
54
    {
55 9
        return $this->scheme;
56
    }
57
58
    /**
59
     * @param  string $scheme
60
     * @return CategoryInterface
61
     */
62 13
    public function setScheme(string $scheme = null) : CategoryInterface
63
    {
64 13
        $this->scheme = $scheme;
65
66 13
        return $this;
67
    }
68
69
    /**
70
     * @return null|string
71
     */
72 12
    public function getLabel() : ? string
73
    {
74 12
        return $this->label;
75
    }
76
77
    /**
78
     * @param  string $label
79
     * @return CategoryInterface
80
     */
81 17
    public function setLabel(string $label = null) : CategoryInterface
82
    {
83 17
        $this->label = $label;
84
85 17
        return $this;
86
    }
87
}
88