Stream   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 94
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 3
Bugs 0 Features 2
Metric Value
wmc 7
c 3
b 0
f 2
lcom 0
cbo 1
dl 0
loc 94
rs 10

7 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 4 1
A getUuid() 0 4 1
A getStatus() 0 4 1
A isEnabled() 0 4 1
A isViewable() 0 4 1
A getView() 0 4 1
A __construct() 0 9 1
1
<?php
2
3
namespace VideoPublisher\Domain;
4
5
/**
6
 * Class Stream.
7
 *
8
 * @author Bart Malestein <[email protected]>
9
 */
10
class Stream
11
{
12
    /**
13
     * @var string
14
     */
15
    private $name;
16
17
    /**
18
     * @var string
19
     */
20
    private $uuid;
21
22
    /**
23
     * @var string
24
     */
25
    private $status;
26
27
    /**
28
     * @var boolean
29
     */
30
    private $enabled;
31
32
    /**
33
     * @var boolean
34
     */
35
    private $viewable;
36
37
    /**
38
     * @var StreamView
39
     */
40
    private $view;
41
42
    /**
43
     * Stream constructor.
44
     * @param $data
45
     */
46
    public function __construct($data)
47
    {
48
        $this->name = $data['streamName'];
49
        $this->uuid = $data['uuid'];
50
        $this->status = $data['status'];
51
        $this->enabled = (boolean)$data['enabled'];
52
        $this->viewable = (boolean)$data['viewable'];
53
        $this->view = new StreamView($data['view']);
54
    }
55
56
    /**
57
     * @return string
58
     */
59
    public function getName()
60
    {
61
        return $this->name;
62
    }
63
64
    /**
65
     * @return string
66
     */
67
    public function getUuid()
68
    {
69
        return $this->uuid;
70
    }
71
72
    /**
73
     * @return string
74
     */
75
    public function getStatus()
76
    {
77
        return $this->status;
78
    }
79
80
    /**
81
     * @return boolean
82
     */
83
    public function isEnabled()
84
    {
85
        return $this->enabled;
86
    }
87
88
    /**
89
     * @return boolean
90
     */
91
    public function isViewable()
92
    {
93
        return $this->viewable;
94
    }
95
96
    /**
97
     * @return StreamView
98
     */
99
    public function getView()
100
    {
101
        return $this->view;
102
    }
103
}