Completed
Pull Request — master (#1)
by
unknown
02:10
created

Organization   A

Complexity

Total Complexity 16

Size/Duplication

Total Lines 154
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 16
lcom 0
cbo 1
dl 0
loc 154
rs 10
c 0
b 0
f 0

16 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 4 1
A setName() 0 4 1
A getEmail() 0 4 1
A setEmail() 0 4 1
A getImage() 0 4 1
A setImage() 0 4 1
A getTimezone() 0 4 1
A setTimezone() 0 4 1
A getCountry() 0 4 1
A setCountry() 0 4 1
A getDelegatees() 0 4 1
A setDelegatees() 0 4 1
A getTimeCreated() 0 4 1
A getTimeLastModified() 0 4 1
A update() 0 4 1
A setMetadata() 0 4 1
1
<?php
2
3
namespace Onfleet;
4
5
/**
6
 * Class Organization
7
 * @package Onfleet
8
 */
9
class Organization extends Entity
10
{
11
    protected $name;
12
    protected $email;
13
    protected $image;
14
    protected $timezone;
15
    protected $country;
16
    protected $timeCreated;
17
    protected $timeLastModified;
18
    protected $delegatees = [];
19
20
    protected $endpoint = 'organization';
21
22
    protected static $properties = [
23
        'id',
24
        'name',
25
        'email',
26
        'image',
27
        'timezone',
28
        'country',
29
        'timeCreated',
30
        'timeLastModified',
31
        'delegatees',
32
    ];
33
34
    /**
35
     * @return mixed
36
     */
37
    public function getName()
38
    {
39
        return $this->name;
40
    }
41
42
    /**
43
     * @param mixed $name
44
     */
45
    public function setName($name)
46
    {
47
        $this->name = $name;
48
    }
49
50
    /**
51
     * @return mixed
52
     */
53
    public function getEmail()
54
    {
55
        return $this->email;
56
    }
57
58
    /**
59
     * @param mixed $email
60
     */
61
    public function setEmail($email)
62
    {
63
        $this->email = $email;
64
    }
65
66
    /**
67
     * @return mixed
68
     */
69
    public function getImage()
70
    {
71
        return $this->image;
72
    }
73
74
    /**
75
     * @param mixed $image
76
     */
77
    public function setImage($image)
78
    {
79
        $this->image = $image;
80
    }
81
82
    /**
83
     * @return mixed
84
     */
85
    public function getTimezone()
86
    {
87
        return $this->timezone;
88
    }
89
90
    /**
91
     * @param mixed $timezone
92
     */
93
    public function setTimezone($timezone)
94
    {
95
        $this->timezone = $timezone;
96
    }
97
98
    /**
99
     * @return mixed
100
     */
101
    public function getCountry()
102
    {
103
        return $this->country;
104
    }
105
106
    /**
107
     * @param mixed $country
108
     */
109
    public function setCountry($country)
110
    {
111
        $this->country = $country;
112
    }
113
114
    /**
115
     * @return array
116
     */
117
    public function getDelegatees(): array
118
    {
119
        return $this->delegatees;
120
    }
121
122
    /**
123
     * @param array $delegatees
124
     */
125
    public function setDelegatees(array $delegatees)
126
    {
127
        $this->delegatees = $delegatees;
128
    }
129
130
    /**
131
     * @return mixed
132
     */
133
    public function getTimeCreated()
134
    {
135
        return $this->timeCreated;
136
    }
137
138
    /**
139
     * @return mixed
140
     */
141
    public function getTimeLastModified()
142
    {
143
        return $this->timeLastModified;
144
    }
145
146
    /**
147
     * @throws \BadMethodCallException
148
     */
149
    public function update()
150
    {
151
        throw new \BadMethodCallException('Organization can not be updated');
152
    }
153
154
    /**
155
     * @param array $metadata
156
     * @internal
157
     */
158
    public function setMetadata(array $metadata)
159
    {
160
        throw new \BadMethodCallException('Organization does not support metadata');
161
    }
162
}
163
164