MockHttpClient::getContent()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
4
namespace W2w\Lib\ApieDomainPlugin\HttpClient;
5
6
use Pdp\HttpClient;
7
use Pdp\HttpClientException;
8
9
class MockHttpClient implements HttpClient
10
{
11
12
    /**
13
     * Returns the content fetched from a given URL.
14
     *
15
     * @param string $url
16
     *
17
     * @return string Retrieved content
18
     * @throws HttpClientException If an errors occurs while fetching the content from a given URL
19
     *
20
     */
21
    public function getContent(string $url): string
22
    {
23
        return file_get_contents(__DIR__ . '/../../data/public-suffix.dat');
24
    }
25
}
26