Restful::loadAnswer()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 8
rs 10
c 0
b 0
f 0
ccs 7
cts 7
cp 1
crap 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