Request   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A createWorker() 0 13 1
A isSupported() 0 4 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
    public static function isSupported()
31
    {
32
        return true;
33
    }
34
}
35