ApiResult::setUrl()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace LoLApi\Result;
4
5
use Psr\Http\Message\ResponseInterface;
6
7
/**
8
 * Class ApiResult
9
 *
10
 * @package LoLApi\Result
11
 */
12
class ApiResult
13
{
14
    /** @var ResponseInterface */
15
    protected $httpResponse;
16
17
    /** @var mixed */
18
    protected $result;
19
20
    /** @var string */
21
    protected $url;
22
23
    /** @var bool */
24
    protected $fetchedFromCache = false;
25
26
    /**
27
     * @return ResponseInterface
28
     */
29 1
    public function getHttpResponse()
30
    {
31 1
        return $this->httpResponse;
32
    }
33
34
    /**
35
     * @param ResponseInterface $httpResponse
36
     *
37
     * @return $this
38
     */
39 1
    public function setHttpResponse($httpResponse = null)
40
    {
41 1
        $this->httpResponse = $httpResponse;
42
43 1
        return $this;
44
    }
45
46
    /**
47
     * @return mixed
48
     */
49 1
    public function getResult()
50
    {
51 1
        return $this->result;
52
    }
53
54
    /**
55
     * @param mixed $result
56
     *
57
     * @return $this
58
     */
59 1
    public function setResult($result)
60
    {
61 1
        $this->result = $result;
62
63 1
        return $this;
64
    }
65
66
    /**
67
     * @return string
68
     */
69 1
    public function getUrl()
70
    {
71 1
        return $this->url;
72
    }
73
74
    /**
75
     * @param string $url
76
     *
77
     * @return $this
78
     */
79 1
    public function setUrl($url)
80
    {
81 1
        $this->url = $url;
82
83 1
        return $this;
84
    }
85
86
    /**
87
     * @return boolean
88
     */
89 1
    public function isFetchedFromCache()
90
    {
91 1
        return $this->fetchedFromCache;
92
    }
93
94
    /**
95
     * @param boolean $fetchedFromCache
96
     *
97
     * @return $this
98
     */
99 1
    public function setFetchedFromCache($fetchedFromCache)
100
    {
101 1
        $this->fetchedFromCache = $fetchedFromCache;
102
103 1
        return $this;
104
    }
105
}
106