WorkflowResourceModel   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 157
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 157
ccs 25
cts 25
cp 1
rs 10
c 0
b 0
f 0

10 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 4 1
A setId() 0 6 1
A getName() 0 4 1
A setName() 0 6 1
A getStandard() 0 4 1
A setStandard() 0 6 1
A getHidden() 0 4 1
A setHidden() 0 6 1
A getCustomStatuses() 0 4 1
A setCustomStatuses() 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\Workflow;
13
14
use JMS\Serializer\Annotation as SA;
15
use Zibios\WrikePhpJmsserializer\Model\AbstractModel;
16
use Zibios\WrikePhpJmsserializer\Model\Common\CustomStatusModel;
17
use Zibios\WrikePhpJmsserializer\Model\ResourceModelInterface;
18
19
/**
20
 * Workflow Resource Model.
21
 */
22
class WorkflowResourceModel extends AbstractModel implements ResourceModelInterface
23
{
24
    /**
25
     * Workflow ID.
26
     *
27
     * Comment: Workflow ID
28
     *
29
     * @SA\Type("string")
30
     * @SA\SerializedName("id")
31
     *
32
     * @var string|null
33
     */
34
    protected $id;
35
36
    /**
37
     * Name (128 symbols max).
38
     *
39
     * @SA\Type("string")
40
     * @SA\SerializedName("name")
41
     *
42
     * @var string|null
43
     */
44
    protected $name;
45
46
    /**
47
     * Defines default workflow.
48
     *
49
     * @SA\Type("boolean")
50
     * @SA\SerializedName("standard")
51
     *
52
     * @var bool|null
53
     */
54
    protected $standard;
55
56
    /**
57
     * Workflow is hidden.
58
     *
59
     * @SA\Type("boolean")
60
     * @SA\SerializedName("hidden")
61
     *
62
     * @var bool|null
63
     */
64
    protected $hidden;
65
66
    /**
67
     * Custom statuses.
68
     *
69
     * ID and group cannot be set simultaneously in request parameter,
70
     * but ID is required for update, and group is required for insert
71
     *
72
     * @SA\Type("array<Zibios\WrikePhpJmsserializer\Model\Common\CustomStatusModel>")
73
     * @SA\SerializedName("customStatuses")
74
     *
75
     * @var array|CustomStatusModel[]|null
76
     */
77
    protected $customStatuses;
78
79
    /**
80
     * @return null|string
81
     */
82 1
    public function getId()
83
    {
84 1
        return $this->id;
85
    }
86
87
    /**
88
     * @param null|string $id
89
     *
90
     * @return WorkflowResourceModel
91
     */
92 1
    public function setId($id)
93
    {
94 1
        $this->id = $id;
95
96 1
        return $this;
97
    }
98
99
    /**
100
     * @return null|string
101
     */
102 1
    public function getName()
103
    {
104 1
        return $this->name;
105
    }
106
107
    /**
108
     * @param null|string $name
109
     *
110
     * @return $this
111
     */
112 1
    public function setName($name)
113
    {
114 1
        $this->name = $name;
115
116 1
        return $this;
117
    }
118
119
    /**
120
     * @return bool|null
121
     */
122 1
    public function getStandard()
123
    {
124 1
        return $this->standard;
125
    }
126
127
    /**
128
     * @param bool|null $standard
129
     *
130
     * @return $this
131
     */
132 1
    public function setStandard($standard)
133
    {
134 1
        $this->standard = $standard;
135
136 1
        return $this;
137
    }
138
139
    /**
140
     * @return bool|null
141
     */
142 1
    public function getHidden()
143
    {
144 1
        return $this->hidden;
145
    }
146
147
    /**
148
     * @param bool|null $hidden
149
     *
150
     * @return $this
151
     */
152 1
    public function setHidden($hidden)
153
    {
154 1
        $this->hidden = $hidden;
155
156 1
        return $this;
157
    }
158
159
    /**
160
     * @return array|null|CustomStatusModel[]
161
     */
162 1
    public function getCustomStatuses()
163
    {
164 1
        return $this->customStatuses;
165
    }
166
167
    /**
168
     * @param array|null|CustomStatusModel[] $customStatuses
169
     *
170
     * @return $this
171
     */
172 1
    public function setCustomStatuses($customStatuses)
173
    {
174 1
        $this->customStatuses = $customStatuses;
175
176 1
        return $this;
177
    }
178
}
179