OnCall   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 37
c 0
b 0
f 0
wmc 4
lcom 0
cbo 0
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 1
A level() 0 4 1
A user() 0 4 1
A escalationPolicy() 0 4 1
1
<?php
2
3
namespace Shrikeh\PagerDuty\Entity\OnCall;
4
5
use Shrikeh\PagerDuty\Entity\EscalationPolicy;
6
use Shrikeh\PagerDuty\Entity\User;
7
use Shrikeh\PagerDuty\Entity\OnCall as OnCallInterface;
8
9
final class OnCall implements OnCallInterface
10
{
11
    private $level;
12
13
    private $user;
14
15
    private $escalationPolicy;
16
17
    private $schedule;
18
19
    public function __construct(
20
        EscalationPolicy $policy,
21
        $user,
22
        $level,
23
        $schedule = null
24
    ) {
25
        $this->escalationPolicy = $policy;
26
        $this->user             = $user;
27
        $this->level            = $level;
28
        $this->schedule         = $schedule;
29
    }
30
31
    public function level()
32
    {
33
        return $this->level;
34
    }
35
36
    public function user()
37
    {
38
        return $this->user;
39
    }
40
41
    public function escalationPolicy()
42
    {
43
        return $this->escalationPolicy;
44
    }
45
}
46