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

GuzzleRequest   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
eloc 11
c 1
b 0
f 0
dl 0
loc 37
ccs 14
cts 14
cp 1
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A hasServerCookies() 0 3 1
A setUrlEncodedData() 0 5 1
A hasUrlEncodedData() 0 3 1
A getServerCookies() 0 3 1
A getUrlEncodedData() 0 3 1
A setServerCookies() 0 5 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