Response   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 9
c 2
b 0
f 0
dl 0
loc 36
ccs 0
cts 24
cp 0
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getHeaders() 0 3 1
A getReasonPhrase() 0 3 1
A getStatusCode() 0 3 1
A getWorker() 0 3 1
A __construct() 0 4 1
A getHeader() 0 3 1
1
<?php
2
/**
3
 * ActiveRecord for API
4
 *
5
 * @link      https://github.com/hiqdev/yii2-hiart
6
 * @package   yii2-hiart
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2015-2019, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hiqdev\hiart\proxy;
12
13
abstract class Response extends \hiqdev\hiart\AbstractResponse
14
{
15
    /**
16
     * @var object
17
     */
18
    protected $worker;
19
20
    public function __construct(Request $request, $worker)
21
    {
22
        $this->request = $request;
23
        $this->worker = $worker;
24
    }
25
26
    public function getWorker()
27
    {
28
        return $this->worker;
29
    }
30
31
    public function getHeader($name)
32
    {
33
        return $this->worker->getHeader($name);
34
    }
35
36
    public function getStatusCode()
37
    {
38
        return $this->worker->getStatusCode();
39
    }
40
41
    public function getHeaders()
42
    {
43
        return $this->worker->getHeaders();
44
    }
45
46
    public function getReasonPhrase()
47
    {
48
        return $this->worker->getReasonPhrase();
49
    }
50
}
51