Addresses   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 2
cbo 2
dl 0
loc 48
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A paginate() 0 4 1
A states() 0 4 1
A types() 0 4 1
A cities() 0 4 1
1
<?php
2
3
namespace JulianoBailao\DomusApi\Endpoints;
4
5
use JulianoBailao\DomusApi\Core\Endpoint;
6
use JulianoBailao\DomusApi\Endpoints\Secondary\Cities;
7
8
class Addresses extends Endpoint
9
{
10
    /**
11
     * Get a page of addresses list.
12
     *
13
     * @param array $query the request query string.
14
     *
15
     * @return stdObject
16
     */
17 3
    public function paginate(array $query = [])
18
    {
19 3
        return $this->page('operacional/enderecos', $query);
20
    }
21
22
    /**
23
     * Get a page of states list.
24
     *
25
     * @param array $query the request query string.
26
     *
27
     * @return stdObject
28
     */
29 3
    public function states(array $query = [])
30
    {
31 3
        return $this->page('operacional/enderecos/ufs', $query);
32
    }
33
34
    /**
35
     * Get a page of types list.
36
     *
37
     * @param array $query the request query string.
38
     *
39
     * @return stdObject
40
     */
41 3
    public function types(array $query = [])
42
    {
43 3
        return $this->page('operacional/enderecos/tipos', $query);
44
    }
45
46
    /**
47
     * Get a cities endpoint.
48
     *
49
     * @return Cities
50
     */
51 24
    public function cities()
52
    {
53 24
        return new Cities($this->client);
54
    }
55
}
56