__construct()   A
last analyzed

Complexity

Conditions 3
Paths 4

Size

Total Lines 21
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 13
nc 4
nop 4
dl 0
loc 21
rs 9.3142
c 0
b 0
f 0
1
<?php
2
3
class Kint_Object_Representation_Microtime extends Kint_Object_Representation
0 ignored issues
show
Coding Style introduced by
Kint_Object_Representation_Microtime does not seem to conform to the naming convention (^[A-Z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
Coding Style introduced by
The property $mem_real is not named in camelCase.

This check marks property names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
Coding Style introduced by
The property $mem_peak is not named in camelCase.

This check marks property names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
Coding Style introduced by
The property $mem_peak_real is not named in camelCase.

This check marks property names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
4
{
5
    public $group = null;
6
    public $lap = null;
7
    public $total = null;
8
    public $avg = null;
9
    public $i = 0;
10
    public $mem = 0;
11
    public $mem_real = 0;
0 ignored issues
show
Coding Style introduced by
$mem_real does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
12
    public $mem_peak = null;
0 ignored issues
show
Coding Style introduced by
$mem_peak does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
13
    public $mem_peak_real = null;
0 ignored issues
show
Coding Style introduced by
$mem_peak_real does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
14
    public $hints = array('microtime');
15
16
    public function __construct($group, $lap = null, $total = null, $i = 0)
17
    {
18
        parent::__construct('Microtime');
19
20
        $this->group = $group;
21
        $this->lap = $lap;
22
        $this->total = $total;
23
        $this->i = $i;
24
25
        if ($i) {
26
            $this->avg = $total / $i;
27
        }
28
29
        $this->mem = memory_get_usage();
30
        $this->mem_real = memory_get_usage(true);
31
32
        if (KINT_PHP52) {
33
            $this->mem_peak = memory_get_peak_usage();
34
            $this->mem_peak_real = memory_get_peak_usage(true);
35
        }
36
    }
37
}
38