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

Response   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 1
cbo 2
dl 0
loc 30
ccs 0
cts 10
cp 0
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getRawData() 0 4 1
A getStatusCode() 0 4 1
A getReasonPhrase() 0 4 1
A getHeader() 0 4 1
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