Completed
Push — issue/109 ( 45613d )
by Alex
02:06
created

NullResponse::isModified()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
/*
3
 * This file is part of the feed-io package.
4
 *
5
 * (c) Alexandre Debril <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace FeedIo\Adapter;
12
13
/**
14
 * Null HTTP Response
15
 */
16
class NullResponse implements ResponseInterface
17
{
18
19
    /**
20
     * @return string
21
     */
22 1
    public function getBody()
23
    {
24 1
        return;
25
    }
26
27
    /**
28
    * @return boolean
29
    */
30
    public function isModified()
31
    {
32
        return true;
33
    }
34
35
    /**
36
     * @return \DateTime
37
     */
38 1
    public function getLastModified()
39
    {
40 1
        return new \DateTime('@0');
41
    }
42
43
    /**
44
     * @return array
45
     */
46 1
    public function getHeaders()
47
    {
48 1
        return array();
49
    }
50
51
    /**
52
     * @param  string       $name
53
     * @return array|string
54
     */
55 1
    public function getHeader($name)
56
    {
57 1
        return $name;
58
    }
59
}
60