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

EmulatedHttpAsyncClient::__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 async 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 EmulatedHttpAsyncClient implements HttpClient, HttpAsyncClient
16
{
17
    use HttpAsyncClientEmulator;
18
    use HttpClientDecorator;
19
20
    /**
21
     * @param HttpClient $httpClient
22
     */
23 6
    public function __construct(HttpClient $httpClient)
24
    {
25 6
        $this->httpClient = $httpClient;
26 6
    }
27
}
28