Passed
Push — master ( 25257e...5200e3 )
by Alec
04:00
created

EventsCounter::getRawEventsData()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * User: alec
4
 * Date: 19.11.18
5
 * Time: 17:17
6
 */
7
8
namespace AlecRabbit\Counters;
9
10
class EventsCounter extends TimedCounter
11
{
12
    /**
13
     * Alias to add() method
14
     * @param int|null $time
15
     */
16 1
    public function addEvent(?int $time = null): void
17
    {
18 1
        $this->add($time);
19 1
    }
20
21
    /**
22
     * @return array
23
     */
24 1
    public function getRawEventsData(): array
25
    {
26 1
        return $this->getRawData();
27
    }
28
29
    /**
30
     * @param bool|null $reset
31
     * @return array
32
     */
33 1
    public function getEventsArray(?bool $reset = null): array
34
    {
35 1
        return $this->getDataArray($reset);
36
    }
37
38
    /**
39
     * @param bool|null $reset
40
     * @return object
41
     */
42 1
    public function getEvents(?bool $reset = null): object
43
    {
44 1
        return $this->getDataObject($reset);
45
    }
46
}
47