Category::setTerm()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 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