Completed
Push — master ( 376ce6...0eb5fa )
by Marcel
02:57
created

TimeProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 17
ccs 3
cts 3
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A currentTime() 0 5 1
1
<?php
2
3
namespace UMA\Psr\Http\Message\Internal;
4
5
class TimeProvider
6
{
7
    /**
8
     * Returns an RFC 7321 compliant timestamp.
9
     *
10
     * @return string
11
     *
12
     * @example Sat, 04 Jun 2016 18:28:44 GMT
13
     *
14
     * @see http://tools.ietf.org/html/rfc7231#section-7.1.1.1
15
     */
16 91
    public function currentTime()
17
    {
18 91
        return (new \DateTime('now', new \DateTimeZone('GMT')))
19 91
            ->format('D, d M Y H:i:s T');
20
    }
21
}
22