getValue()   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
eloc 4
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Insenseanalytics\NovaBarMetrics;
4
5
class PostgresFrequencyDistributionExpression 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