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

DebugMeasure::stopMeasure()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 2
eloc 3
nc 2
nop 1
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
}