Passed
Pull Request — master (#269)
by Christopher
03:18
created

ODataCategory   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 62
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 11
c 1
b 0
f 1
dl 0
loc 62
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A setScheme() 0 4 1
A getScheme() 0 3 1
A setTerm() 0 4 1
A getTerm() 0 3 1
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->term   = $term;
36
        $this->scheme = $scheme;
37
    }
38
39
    /**
40
     * @return string
41
     */
42
    public function getTerm(): string
43
    {
44
        return $this->term;
45
    }
46
47
    /**
48
     * @param string $term
49
     * @return ODataCategory
50
     */
51
    public function setTerm(string $term): ODataCategory
52
    {
53
        $this->term = $term;
54
        return $this;
55
    }
56
57
    /**
58
     * @return string
59
     */
60
    public function getScheme(): string
61
    {
62
        return $this->scheme;
63
    }
64
65
    /**
66
     * @param string $scheme
67
     * @return ODataCategory
68
     */
69
    public function setScheme(string $scheme): ODataCategory
70
    {
71
        $this->scheme = $scheme;
72
        return $this;
73
    }
74
}
75