Poll   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 71
Duplicated Lines 0 %

Test Coverage

Coverage 56%

Importance

Changes 0
Metric Value
dl 0
loc 71
ccs 14
cts 25
cp 0.56
rs 10
c 0
b 0
f 0
wmc 10

10 Methods

Rating   Name   Duplication   Size   Complexity  
A setDetails() 0 5 1
A setCreatedAt() 0 5 1
A getProject() 0 3 1
A getIsEnded() 0 3 1
A setEndedAt() 0 5 1
A getDetails() 0 3 1
A getCreatedAt() 0 3 1
A getEndedAt() 0 3 1
A setIsEnded() 0 5 1
A setProject() 0 5 1
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
}