Level::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 3
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/** Level class */
3
4
namespace smtech\GradingAnalytics\HeatMap;
5
6
/**
7
 * Comparable levels of something
8
 *
9
 * Used for generating heatmap-style color-coding
10
 *
11
 * @author Seth Battis <[email protected]>
12
 */
13
class Level
14
{
15
    /**
16
     * Level of color-coding (less is better)
17
     * @var integer
18
     */
19
    public $level;
20
21
    /**
22
     * Cut-off value for level
23
     * @var integer
24
     */
25
    public $value;
26
27
    /**
28
     * Comparison direction to determine inclusion in level
29
     * @var Comparison
30
     */
31
    public $comparison;
32
33
    /**
34
     * Construct a Level object
35
     *
36
     * @param integer $level Color-coding level
37
     * @param integer $value Cut-off value
38
     * @param Comparison $comparison Comparison direction
39
     */
40
    public function __construct($level, $value, Comparison $comparison)
41
    {
42
        $this->level = $level;
43
        $this->value = $value;
44
        $this->comparison = $comparison;
45
    }
46
}
47