Conditions | 1 |
Paths | 1 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
33 | function realmConfiguration($realm) |
||
34 | { |
||
35 | $defaults = [ |
||
36 | 'secure' => false, |
||
37 | ]; |
||
38 | |||
39 | $options = array_merge( |
||
40 | $defaults, |
||
41 | Configure::read('WyriHaximus.Ratchet.realms.' . $realm), |
||
42 | Configure::read('WyriHaximus.Ratchet.external') |
||
43 | ); |
||
44 | |||
45 | $config = [ |
||
46 | 'realm' => $realm, |
||
47 | 'url' => createUrl($options['secure'], $options['hostname'], $options['port'], $options['path']), |
||
48 | ]; |
||
49 | |||
50 | return array_merge($options['config'], $config); |
||
51 | } |
||
52 | |||
83 |