Hub   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 64
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 4 1
A getLocation() 0 4 1
A getAddress() 0 4 1
A update() 0 4 1
A delete() 0 4 1
A setMetadata() 0 4 1
1
<?php
2
3
namespace Anorgan\Onfleet;
4
5
/**
6
 * Class Hub
7
 * @package Anorgan\Onfleet
8
 */
9
class Hub extends Entity
10
{
11
    protected $name;
12
    protected $location;
13
    protected $address;
14
15
    protected $endpoint = 'hubs';
16
17
    protected static $properties = [
18
        'id',
19
        'name',
20
        'location',
21
        'address',
22
    ];
23
24
    /**
25
     * @return mixed
26
     */
27
    public function getName()
28
    {
29
        return $this->name;
30
    }
31
32
    /**
33
     * @return mixed
34
     */
35
    public function getLocation()
36
    {
37
        return $this->location;
38
    }
39
40
    /**
41
     * @return mixed
42
     */
43
    public function getAddress()
44
    {
45
        return $this->address;
46
    }
47
48
    /**
49
     * @throws \BadMethodCallException
50
     */
51
    public function update()
52
    {
53
        throw new \BadMethodCallException('Hub can not be updated');
54
    }
55
56
    /**
57
     * @throws \BadMethodCallException
58
     */
59
    public function delete()
60
    {
61
        throw new \BadMethodCallException('Hub can not be deleted');
62
    }
63
64
    /**
65
     * @param array $metadata
66
     * @internal
67
     */
68
    public function setMetadata(array $metadata)
69
    {
70
        throw new \BadMethodCallException('Hub does not support metadata');
71
    }
72
}
73