Passed
Branch feature/v2 (61dd95)
by Valentin
05:53
created

AbstractRange   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 26
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getInterval() 0 4 1
A getFormat() 0 4 1
A getRange() 0 4 1
1
<?php
2
3
namespace Spiral\Statistics\Extract\Range;
4
5
use Spiral\Statistics\Extract\RangeInterface;
6
7
abstract class AbstractRange implements RangeInterface
8
{
9
    /**
10
     * {@inheritdoc}
11
     */
12
    public function getInterval(): \DateInterval
13
    {
14
        return new \DateInterval(static::INTERVAL);
15
    }
16
17
    /**
18
     * {@inheritdoc}
19
     */
20
    public function getFormat(): string
21
    {
22
        return static::FORMAT;
23
    }
24
25
    /**
26
     * {@inheritdoc}
27
     */
28
    public function getRange(): string
29
    {
30
        return static::RANGE;
31
    }
32
}