MockHttpClient   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 15
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getContent() 0 3 1
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