Completed
Pull Request — master (#257)
by Éloi
01:56
created

MediaCategory   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 74
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 74
ccs 15
cts 15
cp 1
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getText() 0 4 1
A setText() 0 6 1
A getLabel() 0 4 1
A setLabel() 0 6 1
A getScheme() 0 4 1
A setScheme() 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\Item;
12
13
class MediaCategory implements MediaCategoryInterface
14
{
15
    /**
16
     * @var string
17
     */
18
    protected $text;
19
20
    /**
21
     * @var string
22
     */
23
    protected $label;
24
25
    /**
26
     * @var string
27
     */
28
    protected $scheme;
29
30
    /**
31
     * @return string
32
     */
33 2
    public function getText() : ?string
34
    {
35 2
        return $this->text;
36
    }
37
38
    /**
39
     * @param  string $text
40
     * @return MediaCategoryInterface
41
     */
42 2
    public function setText(?string $text) : MediaCategoryInterface
43
    {
44 2
        $this->text = $text;
45
46 2
        return $this;
47
    }
48
49
    /**
50
     * @return string
51
     */
52 2
    public function getLabel() : ?string
53
    {
54 2
        return $this->label;
55
    }
56
57
    /**
58
     * @param  string $label
59
     * @return MediaCategoryInterface
60
     */
61 2
    public function setLabel(?string $label) : MediaCategoryInterface
62
    {
63 2
        $this->label = $label;
64
65 2
        return $this;
66
    }
67
68
    /**
69
     * @return string
70
     */
71 2
    public function getScheme() : ?string
72
    {
73 2
        return $this->scheme;
74
    }
75
76
    /**
77
     * @param  string $scheme
78
     * @return MediaCategoryInterface
79
     */
80 2
    public function setScheme(?string $scheme) : MediaCategoryInterface
81
    {
82 2
        $this->scheme = $scheme;
83
84 2
        return $this;
85
    }
86
}
87