PublisherBuilder   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
dl 0
loc 17
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A build() 0 11 1
1
<?php
2
3
namespace SquareetLabs\LaravelOpenVidu\Builders;
4
5
use SquareetLabs\LaravelOpenVidu\Publisher;
6
7
/**
8
 * Class PublisherBuilder
9
 * @package SquareetLabs\LaravelOpenVidu\Builders
10
 */
11
class PublisherBuilder implements BuilderInterface
12
{
13
    /**
14
     * @param  array  $properties
15
     * @return Publisher
16
     */
17
    public static function build(array $properties)
18
    {
19
        return new Publisher($properties['streamId'],
20
            $properties['createdAt'],
21
            $properties['mediaOptions']['hasAudio'],
22
            $properties['mediaOptions']['hasVideo'],
23
            $properties['mediaOptions']['audioActive'],
24
            $properties['mediaOptions']['videoActive'],
25
            $properties['mediaOptions']['frameRate'],
26
            $properties['mediaOptions']['typeOfVideo'],
27
            $properties['mediaOptions']['videoDimensions']
28
        );
29
    }
30
}