AddServerTimeModifier   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

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

1 Method

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