Metrics   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 4
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A millitime() 0 8 1
1
<?php
2
3
namespace SoliDry\Helpers;
4
5
/**
6
 * Class Metrics
7
 * @package SoliDry\Helpers
8
 */
9
class Metrics
10
{
11
    /**
12
     * @return string
13
     */
14
    public static function millitime()
15
    {
16
        $microtime = microtime();
17
        $comps = explode(' ', $microtime);
18
19
        // Note: Using a string here to prevent loss of precision
20
        // in case of "overflow" (PHP converts it to a double)
21
        return sprintf('%d%03d', $comps[1], $comps[0] * 1000);
22
    }
23
}