Completed
Push — master ( 21cadf...9d5ca9 )
by Mike
03:01
created

ClassroomTrait   B

Complexity

Total Complexity 21

Size/Duplication

Total Lines 123
Duplicated Lines 0 %

Coupling/Cohesion

Components 9
Dependencies 0

Test Coverage

Coverage 94.87%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 21
c 2
b 0
f 0
lcom 9
cbo 0
dl 0
loc 123
ccs 37
cts 39
cp 0.9487
rs 7.1429

10 Methods

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 4 1
A withPresenterEmail() 0 6 1
A withPresenter() 0 7 1
A withLanguageCultureName() 0 6 1
A withAttendeeLimit() 0 6 1
A withPresenterDefaultControls() 0 6 1
A withAttendeeDefaultControls() 0 6 1
A withCreateRecording() 0 6 1
A withReturnUrl() 0 6 1
A withStatusPingUrl() 0 6 1
1
<?php
2
namespace mikemix\Wiziq\Entity\Traits;
3
4
trait ClassroomTrait
5
{
6
    private $title;
7
    private $presenterEmail;
8
    private $presenterId;
9
    private $presenterName;
10
    private $languageCultureName;
11
    private $attendeeLimit;
12
    private $presenterDefaultControls;
13
    private $attendeeDefaultControls;
14
    private $createRecording;
15
    private $returnUrl;
16
    private $statusPingUrl;
17
18
    /**
19
     * @return string
20
     */
21
    public function __toString()
22
    {
23
        return $this->title;
24
    }
25
26
    /**
27
     * @param string $value
28
     * @return self
29
     */
30 1
    public function withPresenterEmail($value)
31
    {
32 1
        $self = clone $this;
33 1
        $self->presenterEmail = (string)$value;
34 1
        return $self;
35
    }
36
37
    /**
38
     * @param int    $id
39
     * @param string $name
40
     * @return self
41
     */
42 12
    public function withPresenter($id, $name)
43
    {
44 12
        $self = clone $this;
45 12
        $self->presenterId   = (int)$id;
46 12
        $self->presenterName = (string)$name;
47 12
        return $self;
48
    }
49
50
    /**
51
     * @param string $value
52
     * @return self
53
     */
54 2
    public function withLanguageCultureName($value)
55
    {
56 2
        $self = clone $this;
57 2
        $self->languageCultureName = (string)$value;
58 2
        return $self;
59
    }
60
61
    /**
62
     * @param int $value
63
     * @return self
64
     */
65 2
    public function withAttendeeLimit($value)
66
    {
67 2
        $self = clone $this;
68 2
        $self->attendeeLimit = (int)$value;
69 2
        return $self;
70
    }
71
72
    /**
73
     * @param string $value
74
     * @return self
75
     */
76 2
    public function withPresenterDefaultControls($value)
77
    {
78 2
        $self = clone $this;
79 2
        $self->presenterDefaultControls = (string)$value;
80 2
        return $self;
81
    }
82
83
    /**
84
     * @param string $value
85
     * @return self
86
     */
87 2
    public function withAttendeeDefaultControls($value)
88
    {
89 2
        $self = clone $this;
90 2
        $self->attendeeDefaultControls = (string)$value;
91 2
        return $self;
92
    }
93
94
    /**
95
     * @param bool $value
96
     * @return self
97
     */
98 2
    public function withCreateRecording($value)
99
    {
100 2
        $self = clone $this;
101 2
        $self->createRecording = (int)(bool)$value;
102 2
        return $self;
103
    }
104
105
    /**
106
     * @param string $value
107
     * @return self
108
     */
109 2
    public function withReturnUrl($value)
110
    {
111 2
        $self = clone $this;
112 2
        $self->returnUrl = (string)$value;
113 2
        return $self;
114
    }
115
116
    /**
117
     * @param string $value
118
     * @return self
119
     */
120 2
    public function withStatusPingUrl($value)
121
    {
122 2
        $self = clone $this;
123 2
        $self->statusPingUrl = (string)$value;
124 2
        return $self;
125
    }
126
}
127