Passed
Push — master ( 71dd4a...2661ba )
by Francis
01:44
created

RTMPKey::fromObject()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 4
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 7
rs 10
1
<?php
2
3
namespace LiveStream\Resources;
4
5
use LiveStream\Resources\Resource;
6
7
class RTMPKey extends Resource
8
{
9
    /**
10
     * Get RTMP Key ID.
11
     *
12
     * @return string|null
13
     */
14
    public function getId(): ?string
15
    {
16
        return $this->data->id ?? null;
17
    }
18
19
    /**
20
     * Get RTMP Key URL.
21
     *
22
     * @return string|null
23
     */
24
    public function getUrl(): ?string
25
    {
26
        return $this->data->rtmpUrl ?? null;
27
    }
28
}
29