Organization   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 106
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

10 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 4 1
A getEmail() 0 4 1
A getImage() 0 4 1
A getTimezone() 0 4 1
A getCountry() 0 4 1
A getDelegatees() 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 Anorgan\Onfleet;
4
5
/**
6
 * Class Organization
7
 * @package Anorgan\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
     * @return mixed
44
     */
45
    public function getEmail()
46
    {
47
        return $this->email;
48
    }
49
50
    /**
51
     * @return mixed
52
     */
53
    public function getImage()
54
    {
55
        return $this->image;
56
    }
57
58
    /**
59
     * @return string
60
     */
61
    public function getTimezone()
62
    {
63
        return $this->timezone;
64
    }
65
66
    /**
67
     * @return mixed
68
     */
69
    public function getCountry()
70
    {
71
        return $this->country;
72
    }
73
74
    /**
75
     * @return array
76
     */
77
    public function getDelegatees(): array
78
    {
79
        return $this->delegatees;
80
    }
81
82
    /**
83
     * @return \DateTime
84
     */
85
    public function getTimeCreated()
86
    {
87
        return $this->toDateTime($this->timeCreated);
88
    }
89
90
    /**
91
     * @return \DateTime
92
     */
93
    public function getTimeLastModified()
94
    {
95
        return $this->toDateTime($this->timeLastModified);
96
    }
97
98
    /**
99
     * @throws \BadMethodCallException
100
     */
101
    public function update()
102
    {
103
        throw new \BadMethodCallException('Organization can not be updated');
104
    }
105
106
    /**
107
     * @param array $metadata
108
     * @internal
109
     */
110
    public function setMetadata(array $metadata)
111
    {
112
        throw new \BadMethodCallException('Organization does not support metadata');
113
    }
114
}
115