Addresses::states()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 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