Completed
Push — master ( 740bbf...e6040b )
by Dmitry
02:33
created

Response::getReasonPhrase()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 3
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace hiqdev\hiart\httpclient;
4
5
/**
6
 * Class Response is a proxy for [[\yii\httpclient\Response]]
7
 */
8
class Response extends \hiqdev\hiart\proxy\Response
9
{
10
    /**
11
     * @var \yii\httpclient\Response
12
     */
13
    protected $worker;
14
15
    /**
16
     * {@inheritdoc}
17
     */
18
    public function getRawData()
19
    {
20
        return $this->worker->getContent();
21
    }
22
23
    public function getStatusCode()
24
    {
25
        return $this->worker->getStatusCode();
26
    }
27
28
    public function getReasonPhrase()
29
    {
30
        return $this->worker->getStatusCode();
31
    }
32
33
    public function getHeader($name)
34
    {
35
        return [$this->worker->getHeaders()->get($name)];
36
    }
37
}
38