NetgsmIys::searchAddress()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 4
c 1
b 0
f 1
dl 0
loc 7
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace TarfinLabs\Netgsm\Iys;
4
5
use TarfinLabs\Netgsm\Iys\Requests\Add;
6
use TarfinLabs\Netgsm\Iys\Requests\Search;
7
8
class NetgsmIys extends AbstractNetgsmIys
9
{
10
    /**
11
     * Add address request.
12
     *
13
     * @param Add $request
14
     * @return $this
15
     */
16
    public function addAddress(Add $request): NetgsmIys
17
    {
18
        $this->url = $request->getUrl();
19
        $this->body[] = $request->body();
20
        $this->method = 'POST';
21
22
        return $this;
23
    }
24
25
    /**
26
     * Search address request.
27
     *
28
     * @param Search $request
29
     * @return $this
30
     */
31
    public function searchAddress(Search $request): NetgsmIys
32
    {
33
        $this->url = $request->getUrl();
34
        $this->body = [$request->body()];
35
        $this->method = 'POST';
36
37
        return $this;
38
    }
39
}
40