Failed Conditions
Push — psr2-config ( de33cd...0a5b05 )
by Andreas
04:27
created

SettingLicense   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A initialize() 0 10 2
1
<?php
2
3
namespace dokuwiki\plugin\config\core\Setting;
4
5
/**
6
 * Class setting_license
7
 */
8
class SettingLicense extends SettingMultichoice {
9
10
    protected $choices = array('');      // none choosen
11
12
    /** @inheritdoc */
13
    public function initialize($default, $local, $protected) {
14
        global $license;
15
16
        foreach($license as $key => $data) {
17
            $this->choices[] = $key;
18
            $this->lang[$this->key . '_o_' . $key] = $data['name']; // stored in setting
19
        }
20
21
        parent::initialize($default, $local, $protected);
22
    }
23
}
24