Total Complexity | 3 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 6 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | abstract class Source |
||
15 | { |
||
16 | /** |
||
17 | * The HTTP client. |
||
18 | */ |
||
19 | protected Client $client; |
||
20 | |||
21 | /** |
||
22 | * Retrieve the HTTP request. |
||
23 | */ |
||
24 | abstract public function request(): RequestInterface; |
||
25 | |||
26 | /** |
||
27 | * Retrieve the HTTP response. |
||
28 | * |
||
29 | * @return ResponseInterface |
||
30 | */ |
||
31 | abstract public function response(): ResponseInterface; |
||
32 | |||
33 | /** |
||
34 | * Instantiate the class. |
||
35 | */ |
||
36 | 50 | final public function __construct( |
|
39 | |||
40 | /** |
||
41 | * Determine whether this class can handle the source. |
||
42 | * |
||
43 | * @codeCoverageIgnore |
||
44 | */ |
||
45 | public function matches(): bool |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * Set the HTTP client. |
||
52 | */ |
||
53 | 50 | public function setClient(Client $client): static |
|
60 |