MySqlFrequencyDistributionExpression   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 5
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getValue() 0 6 1
1
<?php
2
3
namespace Insenseanalytics\NovaBarMetrics;
4
5
class MySqlFrequencyDistributionExpression extends FrequencyDistributionExpression
6
{
7
    /**
8
     * Get the value of the expression.
9
     *
10
     * @return array
11
     */
12
    public function getValue()
13
    {
14
        return [
15
            'range' => "concat({$this->stepSize} * floor({$this->column}/{$this->stepSize}), ' - ', 
16
				{$this->stepSize} * floor({$this->column}/{$this->stepSize}) + {$this->stepSize} - 1)",
17
            'minVal' => "{$this->stepSize} * floor({$this->column}/{$this->stepSize})",
18
        ];
19
    }
20
}
21