Passed
Pull Request — master (#52)
by Darío
08:11 queued 05:24
created

GuzzleRequest::setServerCookies()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 2
c 0
b 0
f 0
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace EasyHttp\GuzzleLayer;
4
5
use EasyHttp\LayerContracts\Common\ClientRequest;
6
7
class GuzzleRequest extends ClientRequest
8
{
9
    protected array $urlEncodedData = [];
10
    protected array $serverCookies = [];
11
12 23
    public function hasUrlEncodedData(): bool
13
    {
14 23
        return ! empty($this->urlEncodedData);
15
    }
16
17 1
    public function getUrlEncodedData(): array
18
    {
19 1
        return $this->urlEncodedData;
20
    }
21
22 1
    public function setUrlEncodedData(array $urlEncodedData): self
23
    {
24 1
        $this->urlEncodedData = $urlEncodedData;
25
26 1
        return $this;
27
    }
28
29 23
    public function hasServerCookies(): bool
30
    {
31 23
        return ! empty($this->serverCookies);
32
    }
33
34 1
    public function getServerCookies(): array
35
    {
36 1
        return $this->serverCookies;
37
    }
38
39 1
    public function setServerCookies(array $serverCookies): self
40
    {
41 1
        $this->serverCookies = $serverCookies;
42
43 1
        return $this;
44
    }
45
}
46