Completed
Pull Request — master (#269)
by Christopher
14:37
created

ODataTitle::getTitle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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