SqliteFrequencyDistributionExpression   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 SqliteFrequencyDistributionExpression 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' => "(cast({$this->stepSize} * cast({$this->column}/{$this->stepSize} as int) as string) || ' - ' || 
16
				cast({$this->stepSize} * cast({$this->column}/{$this->stepSize} as int) + {$this->stepSize} - 1 as string))",
17
            'minVal' => "{$this->stepSize} * cast({$this->column}/{$this->stepSize} as int)",
18
        ];
19
    }
20
}
21