Completed
Push — master ( 23650d...b8cfa5 )
by Jignesh
01:07
created

initConfig   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 25
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A initSetConfigXml() 0 13 2
1
<?php
2
3
4
namespace JoisarJignesh\Bigbluebutton\Services;
5
6
7
use BigBlueButton\Parameters\SetConfigXMLParameters;
8
9
trait initConfig
10
{
11
    /**
12
     * @param $parameters
13
     *
14
     * require fields
15
     * xml
16
     * meetingID
17
     *
18
     * @return SetConfigXMLParameters
19
     */
20
    public function initSetConfigXml(array $parameters)
21
    {
22
        $parameters = Fluent($parameters);
23
        $configXml = new SetConfigXMLParameters($parameters->get('meetingID'));
24
        $rawXml = $parameters->xml;
25
        if (!$parameters->xml instanceof \SimpleXMLElement) {
26
            $rawXml = new \SimpleXMLElement($parameters->xml);
27
        }
28
29
        $configXml->setRawXml($rawXml);
30
31
        return $configXml;
32
    }
33
}
34