Completed
Push — master ( 335120...ad531e )
by Alessandro
9s
created

InfluxDbEvent::getPrecision()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Algatux\InfluxDbBundle\Events;
6
7
use InfluxDB\Point;
8
use Symfony\Component\EventDispatcher\Event;
9
10
/**
11
 * Class InfluxDbEvent.
12
 */
13
abstract class InfluxDbEvent extends Event
14
{
15
    const NAME = 'influxdb.points_collected';
16
17
    /**
18
     * @var Point[]
19
     */
20
    protected $points;
21
22
    /**
23
     * @var string
24
     */
25
    protected $precision;
26
27
    /**
28
     * @param Point[] $points
29
     * @param string  $precision
30
     */
31 5
    public function __construct(array $points, string $precision)
32
    {
33 5
        $this->points = $points;
34 5
        $this->precision = $precision;
35 5
    }
36
37
    /**
38
     * @return Point[]
39
     */
40 5
    final public function getPoints(): array
41
    {
42 5
        return $this->points;
43
    }
44
45
    /**
46
     * @return string
47
     */
48 5
    final public function getPrecision()
49
    {
50 5
        return $this->precision;
51
    }
52
}
53