Completed
Push — master ( 04fa8e...64e2a2 )
by Joel
02:14
created

EmulatedHttpClient::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Http\Client\Common;
4
5
use Http\Client\HttpAsyncClient;
6
use Http\Client\HttpClient;
7
8
/**
9
 * Emulates an HTTP client.
10
 *
11
 * This should be replaced by an anonymous class in PHP 7.
12
 *
13
 * @author Márk Sági-Kazár <[email protected]>
14
 */
15
class EmulatedHttpClient implements HttpClient, HttpAsyncClient
16
{
17
    use HttpAsyncClientDecorator;
18
    use HttpClientEmulator;
19
20
    /**
21
     * @param HttpAsyncClient $httpAsyncClient
22
     */
23 6
    public function __construct(HttpAsyncClient $httpAsyncClient)
24
    {
25 6
        $this->httpAsyncClient = $httpAsyncClient;
26 6
    }
27
}
28