Restful   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 15
rs 10
c 0
b 0
f 0
ccs 9
cts 9
cp 1
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A loadAnswer() 0 8 1
A loadQuery() 0 3 1
1
<?php
2
3
namespace kalanis\RemoteRequest\Protocols;
4
5
6
use kalanis\RemoteRequest;
7
8
9
/**
10
 * Class Restful
11
 * @package kalanis\RemoteRequest\Protocols
12
 * Properties for query to remote server - REST API
13
 */
14
class Restful extends Http
15
{
16 1
    protected function loadQuery(): RemoteRequest\Protocols\Dummy\Query
17
    {
18 1
        return new Restful\Query();
19
    }
20
21 1
    protected function loadAnswer(): RemoteRequest\Protocols\Dummy\Answer
22
    {
23 1
        $lib = new Restful\Answer($this->rrLang);
24 1
        $lib->addStringDecoding(new Http\Answer\DecodeStrings\Chunked());
25 1
        $lib->addStringDecoding(new Http\Answer\DecodeStrings\Zipped());
26 1
        $lib->addStringDecoding(new Http\Answer\DecodeStrings\Compressed());
27 1
        $lib->addStringDecoding(new Http\Answer\DecodeStrings\Deflated());
28 1
        return $lib;
29
    }
30
}
31