Completed
Push — master ( fbdd5a...4063fa )
by Mike
04:02
created

PermaClassroom   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 42
ccs 17
cts 17
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A build() 0 4 1
A toArray() 0 14 1
1
<?php
2
namespace mikemix\Wiziq\Entity;
3
4
use mikemix\Wiziq\Entity\Traits\ClassroomTrait;
5
6
class PermaClassroom
7
{
8
    use ClassroomTrait;
9
10
    /**
11
     * @param string $title
12
     * @param string $presenterEmail
13
     */
14 9
    private function __construct($title, $presenterEmail)
15
    {
16 9
        $this->title          = (string)$title;
17 9
        $this->presenterEmail = (string)$presenterEmail;
18 9
    }
19
20
    /**
21
     * @param string $title
22
     * @param string $presenterEmail
23
     * @return self
24
     */
25 9
    public static function build($title, $presenterEmail)
26
    {
27 9
        return new self($title, $presenterEmail);
28
    }
29
30
    /**
31
     * @return array
32
     */
33 8
    public function toArray()
34
    {
35
        return [
36 8
            'title'                      => $this->title,
37 8
            'presenter_email'            => $this->presenterEmail,
38 8
            'attendee_limit'             => $this->attendeeLimit,
39 8
            'presenter_default_controls' => $this->presenterDefaultControls,
40 8
            'attendee_default_controls'  => $this->attendeeDefaultControls,
41 8
            'create_recording'           => $this->createRecording,
42 8
            'language_culture_name'      => $this->languageCultureName,
43 8
            'return_url'                 => $this->returnUrl,
44 8
            'status_ping_url'            => $this->statusPingUrl,
45 8
        ];
46
    }
47
}
48