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

ODataContainerBase::setUpdated()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 4
rs 10
1
<?php
2
3
4
namespace POData\ObjectModel;
5
6
7
abstract class ODataContainerBase
8
{
9
    /**
10
     * Entry id.
11
     *
12
     * @var string|null
13
     */
14
    public $id;
15
    /**
16
     * Feed title.
17
     *
18
     * @var ODataTitle
19
     */
20
    public $title;
21
22
    /**
23
     * Last updated timestamp.
24
     *
25
     * @var string|null
26
     */
27
    public $updated;
28
29
    /**
30
     * Service Base URI.
31
     *
32
     * @var string|null
33
     */
34
    public $baseURI;
35
36
    /**
37
     * ODataContainerBase constructor.
38
     * @param string|null $id
39
     * @param ODataTitle $title
40
     * @param string|null $updated
41
     * @param string|null $baseURI
42
     */
43
    public function __construct(?string $id, ?ODataTitle $title, ?string $updated, ?string $baseURI)
44
    {
45
        $this
46
            ->setId($id)
47
            ->setTitle($title)
48
            ->setUpdated($updated)
49
            ->setBaseURI($baseURI);
50
    }
51
52
53
    /**
54
     * @return string|null
55
     */
56
    public function getId(): ?string
57
    {
58
        return $this->id;
59
    }
60
61
    /**
62
     * @param string|null $id
63
     * @return self
64
     */
65
    public function setId(?string $id): self
66
    {
67
        $this->id = $id;
68
        return $this;
69
    }
70
71
    /**
72
     * @return ODataTitle|null
73
     */
74
    public function getTitle(): ?ODataTitle
75
    {
76
        return $this->title;
77
    }
78
79
    /**
80
     * @param ODataTitle|null $title
81
     * @return self
82
     */
83
    public function setTitle(?ODataTitle $title): self
84
    {
85
        $this->title = $title;
86
        return $this;
87
    }
88
89
    /**
90
     * @return string|null
91
     */
92
    public function getUpdated(): ?string
93
    {
94
        return $this->updated;
95
    }
96
97
    /**
98
     * @param string|null $updated
99
     * @return ODataEntry
100
     */
101
    public function setUpdated(?string $updated): self
102
    {
103
        $this->updated = $updated;
104
        return $this;
105
    }
106
107
    /**
108
     * @return string|null
109
     */
110
    public function getBaseURI(): ?string
111
    {
112
        return $this->baseURI;
113
    }
114
115
    /**
116
     * @param string|null $baseURI
117
     * @return self
118
     */
119
    public function setBaseURI(?string $baseURI): self
120
    {
121
        $this->baseURI = $baseURI;
122
        return $this;
123
    }
124
}