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

Request   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A createWorker() 0 13 1
1
<?php
2
3
namespace hiqdev\hiart\httpclient;
4
5
/**
6
 * Class Request is a proxy for [[\yii\httpclient\Request]] class
7
 */
8
class Request extends \hiqdev\hiart\proxy\Request
9
{
10
    public $workerClass = \yii\httpclient\Request::class;
11
12
    public $handlerClass = \yii\httpclient\Client::class;
13
14
    public $responseClass = Response::class;
15
16
    public function createWorker()
17
    {
18
        return new $this->workerClass([
19
            'method' => $this->method,
20
            'url' => $this->getFullUri(),
21
            'headers' => $this->headers,
22
            'content' => $this->body,
23
            'client' => $this->getHandler(),
24
            'options' => [
25
                'protocolVersion' => $this->version,
26
            ],
27
        ]);
28
    }
29
}
30