Completed
Push — master ( 4c74f5...2b33f7 )
by Aurimas
04:08
created

DateModifier   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 7
ccs 0
cts 4
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A modify() 0 4 1
1
<?php
2
3
namespace Thruster\Component\HttpServer\ResponseModifier;
4
5
use Psr\Http\Message\ResponseInterface;
6
use Thruster\Component\HttpServer\ResponseModifierInterface;
7
8
/**
9
 * Class DateModifier
10
 *
11
 * @package Thruster\Component\HttpServer\ResponseModifier
12
 * @author  Aurimas Niekis <[email protected]>
13
 */
14
class DateModifier implements ResponseModifierInterface
15
{
16
    public function modify(ResponseInterface $response) : ResponseInterface
17
    {
18
        return $response->withHeader('Date', gmdate('D, d M Y H:i:s T'));
19
    }
20
}
21