TaskDatesModel   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 162
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 10
lcom 0
cbo 1
dl 0
loc 162
ccs 25
cts 25
cp 1
rs 10
c 0
b 0
f 0

10 Methods

Rating   Name   Duplication   Size   Complexity  
A getType() 0 4 1
A setType() 0 6 1
A getDuration() 0 4 1
A setDuration() 0 6 1
A getStart() 0 4 1
A setStart() 0 6 1
A getDue() 0 4 1
A setDue() 0 6 1
A getWorkOnWeekends() 0 4 1
A setWorkOnWeekends() 0 6 1
1
<?php
2
3
/*
4
 * This file is part of the zibios/wrike-php-jmsserializer package.
5
 *
6
 * (c) Zbigniew Ślązak
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Zibios\WrikePhpJmsserializer\Model\Common;
13
14
use JMS\Serializer\Annotation as SA;
15
use Zibios\WrikePhpJmsserializer\Model\AbstractModel;
16
use Zibios\WrikePhpJmsserializer\Model\ResourceModelInterface;
17
18
/**
19
 * Task Dates Model.
20
 */
21
class TaskDatesModel extends AbstractModel implements ResourceModelInterface
22
{
23
    /**
24
     * Type.
25
     *
26
     * Task Dates, Enum: Backlog, Milestone, Planned
27
     *
28
     * @see \Zibios\WrikePhpLibrary\Enum\TaskDatesTypeEnum
29
     *
30
     * @SA\Type("string")
31
     * @SA\SerializedName("type")
32
     *
33
     * @var string|null
34
     */
35
    protected $type;
36
37
    /**
38
     * Duration in minutes. Duration is present in Planned tasks and is optional for Backlog tasks.
39
     *
40
     * @SA\Type("integer")
41
     * @SA\SerializedName("duration")
42
     *
43
     * @var int|null
44
     */
45
    protected $duration;
46
47
    /**
48
     * Start date is present only in Planned tasks.
49
     *
50
     * Format: yyyy-MM-dd'T'HH:mm:ss ('T'HH:mm:ss is optional)
51
     *
52
     * @SA\Type("string")
53
     * @SA\SerializedName("start")
54
     *
55
     * @var string|null
56
     */
57
    protected $start;
58
59
    /**
60
     * Due date is present only in Planned and Milestone tasks.
61
     *
62
     * Format: yyyy-MM-dd'T'HH:mm:ss ('T'HH:mm:ss is optional)
63
     *
64
     * @SA\Type("string")
65
     * @SA\SerializedName("due")
66
     *
67
     * @var string|null
68
     */
69
    protected $due;
70
71
    /**
72
     * Weekends are included in task scheduling.
73
     *
74
     * Comment: Optional
75
     *
76
     * @SA\Type("boolean")
77
     * @SA\SerializedName("workOnWeekends")
78
     *
79
     * @var bool|null
80
     */
81
    protected $workOnWeekends;
82
83
    /**
84
     * @return null|string
85
     */
86 1
    public function getType()
87
    {
88 1
        return $this->type;
89
    }
90
91
    /**
92
     * @param null|string $type
93
     *
94
     * @return $this
95
     */
96 1
    public function setType($type)
97
    {
98 1
        $this->type = $type;
99
100 1
        return $this;
101
    }
102
103
    /**
104
     * @return int|null
105
     */
106 1
    public function getDuration()
107
    {
108 1
        return $this->duration;
109
    }
110
111
    /**
112
     * @param int|null $duration
113
     *
114
     * @return $this
115
     */
116 1
    public function setDuration($duration)
117
    {
118 1
        $this->duration = $duration;
119
120 1
        return $this;
121
    }
122
123
    /**
124
     * @return string|null
125
     */
126 1
    public function getStart()
127
    {
128 1
        return $this->start;
129
    }
130
131
    /**
132
     * @param string|null $start
133
     *
134
     * @return $this
135
     */
136 1
    public function setStart($start)
137
    {
138 1
        $this->start = $start;
139
140 1
        return $this;
141
    }
142
143
    /**
144
     * @return string|null
145
     */
146 1
    public function getDue()
147
    {
148 1
        return $this->due;
149
    }
150
151
    /**
152
     * @param string|null $due
153
     *
154
     * @return $this
155
     */
156 1
    public function setDue($due)
157
    {
158 1
        $this->due = $due;
159
160 1
        return $this;
161
    }
162
163
    /**
164
     * @return bool|null
165
     */
166 1
    public function getWorkOnWeekends()
167
    {
168 1
        return $this->workOnWeekends;
169
    }
170
171
    /**
172
     * @param bool|null $workOnWeekends
173
     *
174
     * @return $this
175
     */
176 1
    public function setWorkOnWeekends($workOnWeekends)
177
    {
178 1
        $this->workOnWeekends = $workOnWeekends;
179
180 1
        return $this;
181
    }
182
}
183