Test Failed
Push — master ( 8544d9...bfc40d )
by Alexey
03:04
created

DailyEvents   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getDate() 0 4 1
A getEventsCount() 0 4 1
1
<?php
2
3
namespace Skobkin\Bundle\PointToolsBundle\DTO;
4
5
/**
6
 * Events count by day
7
 */
8
class DailyEvents
9
{
10
    /**
11
     * @var \DateTime
12
     */
13
    private $date;
14
15
    /**
16
     * @var int
17
     */
18
    private $eventsCount;
19
20
    public function __construct(string $date, int $eventsCount)
21
    {
22
        $this->date = new \DateTime($date);
23
        $this->eventsCount = $eventsCount;
24
    }
25
26
    public function getDate(): \DateTime
27
    {
28
        return $this->date;
29
    }
30
31
    public function getEventsCount(): int
32
    {
33
        return $this->eventsCount;
34
    }
35
}