AbstractProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getCurrentTimestamp() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the Teazee package.
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 *
8
 * @license    MIT License
9
 */
10
namespace Teazee\Provider;
11
12
use DateTimeImmutable;
13
use DateTimeZone;
14
15
/**
16
 * @author Michael Crumm <[email protected]>
17
 */
18
abstract class AbstractProvider implements Provider
19
{
20
    /**
21
     * Returns the current time as seconds since January 1, 1970 UTC.
22
     *
23
     * @return int
24
     */
25
    protected function getCurrentTimestamp()
26
    {
27 1
        return (new DateTimeImmutable(null, new DateTimeZone('UTC')))->getTimestamp();
28
    }
29
}
30