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

NFLHttpClient::get()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
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