Completed
Push — master ( bc3898...bd8c0c )
by Mihail
04:18
created

DebugMeasure   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 4
c 0
b 0
f 0
lcom 0
cbo 2
dl 0
loc 22
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A startMeasure() 0 5 2
A stopMeasure() 0 5 2
1
<?php
2
3
namespace Ffcms\Core\Debug;
4
5
use Ffcms\Core\App;
6
7
/**
8
 * Trait DebugMeasure. Debug tools for ease use
9
 * @package Ffcms\Core\Debug
10
 */
11
trait DebugMeasure
12
{
13
    /**
14
     * Start timeline measure
15
     * @param string $name
16
     */
17
    public function startMeasure(string $name): void
18
    {
19
        if (App::$Debug)
20
            App::$Debug->startMeasure($name);
21
    }
22
23
    /**
24
     * Stop timeline measure
25
     * @param string $name
26
     */
27
    public function stopMeasure(string $name): void
28
    {
29
        if (App::$Debug)
30
            App::$Debug->stopMeasure($name);
31
    }
32
}