Completed
Push — master ( 652e57...3ec9c1 )
by Max
03:33
created

NFLHttpClient   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 19
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A get() 0 3 1
1
<?php
2
3
namespace NFLScores\Http;
4
5
/**
6
 * HTTP client for getting
7
 * NFL games data.
8
 */
9
class NFLHttpClient extends AbstractHttpClient
10
{
11
    /**
12
     * {@inheritdoc}
13
     */
14
    protected $url = 'https://feeds.nfl.com/feeds-rs/scores.json';
15
16
    /**
17
     * Gets and data from a remote source.
18
     *
19
     * @param string $url
20
     *
21
     * @throws \ErrorException
22
     *
23
     * @return string
24
     */
25
    public function get(): string
26
    {
27
        return file_get_contents($this->url);
28
    }
29
}
30