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

TimeProvider::currentTime()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

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