Timer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getUnixTimestamp() 0 4 1
1
<?php
2
3
/**
4
 * Cruft flake timer.
5
 * 
6
 * @author @davegardnerisme
7
 */
8
9
namespace Gendoria\CruftFlake\Timer;
10
11
class Timer implements TimerInterface
12
{
13
    /**
14
     * Get unix timestamp to millisecond accuracy.
15
     * 
16
     * (Number of whole milliseconds that have passed since 1970-01-01
17
     * 
18
     * @return int
19
     */
20 1
    public function getUnixTimestamp()
21
    {
22 1
        return (int) floor(microtime(true) * 1000);
23
    }
24
}
25