Values::trkValues()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 1
nc 2
nop 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Trunking of "counter" and "gauge"
4
 * User: moyo
5
 * Date: 2018/5/19
6
 * Time: 1:18 PM
7
 */
8
9
namespace Carno\Monitor\Chips\Trunks;
10
11
trait Values
12
{
13
    /**
14
     * @param array $input
15
     * @param array $output
16
     */
17
    protected function trkValues(array $input, array &$output) : void
18
    {
19
        empty($output) ? $output = $input : $output['value'] += $input['value'];
20
    }
21
}
22