Passed
Push — master ( 6b2979...464731 )
by Alex
04:00 queued 11s
created

ODataCategory::getScheme()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace POData\ObjectModel;
6
7
/**
8
 * Class ODataCategory.
9
 * @package POData\ObjectModel
10
 */
11
class ODataCategory
12
{
13
    /**
14
     * Term.
15
     *
16
     * @var string
17
     */
18
    private $term;
19
20
    /**
21
     * Scheme.
22
     *
23
     * @var string
24
     */
25
    private $scheme;
26
27
    /**
28
     * ODataCategory constructor.
29
     *
30
     * @param        $term
31
     * @param string $scheme
32
     */
33
    public function __construct($term, $scheme = 'http://schemas.microsoft.com/ado/2007/08/dataservices/scheme')
34
    {
35
        $this
36
            ->setTerm($term)
37
            ->setScheme($scheme);
38
    }
39
40
    /**
41
     * @return string
42
     */
43
    public function getTerm(): string
44
    {
45
        return $this->term;
46
    }
47
48
    /**
49
     * @param  string        $term
50
     * @return ODataCategory
51
     */
52
    public function setTerm(string $term): ODataCategory
53
    {
54
        $this->term = $term;
55
        return $this;
56
    }
57
58
    /**
59
     * @return string
60
     */
61
    public function getScheme(): string
62
    {
63
        return $this->scheme;
64
    }
65
66
    /**
67
     * @param  string        $scheme
68
     * @return ODataCategory
69
     */
70
    public function setScheme(string $scheme): ODataCategory
71
    {
72
        $this->scheme = $scheme;
73
        return $this;
74
    }
75
}
76