Poll::setDetails()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
ccs 0
cts 3
cp 0
crap 2
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace App\Model\Project;
4
5
abstract class Poll
6
{
7
    /** @var Project **/
8
    protected $project;
9
    /** @var Details **/
10
    protected $details;
11
    /** @var bool **/
12
    protected $isEnded;
13
    /** @var \DateTime **/
14
    protected $createdAt;
15
    /** @var \DateTime **/
16
    protected $endedAt;
17
    
18 1
    public function setProject(Project $project): Poll
19
    {
20 1
        $this->project = $project;
21
        
22 1
        return $this;
23
    }
24
    
25
    public function getProject(): Project
26
    {
27
        return $this->project;
28
    }
29
    
30
    public function setDetails(Details $details): Poll
31
    {
32
        $this->details = $details;
33
        
34
        return $this;
35
    }
36
    
37
    public function getDetails(): Details
38
    {
39
        return $this->details;
40
    }
41
    
42 1
    public function setIsEnded(bool $isEnded): Poll
43
    {
44 1
        $this->isEnded = $isEnded;
45
        
46 1
        return $this;
47
    }
48
    
49 1
    public function getIsEnded(): bool
50
    {
51 1
        return $this->isEnded;
52
    }
53
    
54 1
    public function setCreatedAt(\DateTime $createdAt): Poll
55
    {
56 1
        $this->createdAt = $createdAt;
57
        
58 1
        return $this;
59
    }
60
    
61
    public function getCreatedAt(): \DateTime
62
    {
63
        return $this->createdAt;
64
    }
65
    
66 1
    public function setEndedAt(\DateTime $endedAt): Poll
67
    {
68 1
        $this->endedAt = $endedAt;
69
        
70 1
        return $this;
71
    }
72
    
73
    public function getEndedAt(): \DateTime
74
    {
75
        return $this->endedAt;
76
    }
77
}