Completed
Push — 1.10.x ( 123d3d...a32a3a )
by
unknown
52:30
created

SelectTheme::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 12
rs 9.4285
cc 2
eloc 8
nc 2
nop 4
1
<?php
2
/* For licensing terms, see /license.txt */
3
4
/**
5
* A dropdownlist with all themes to use with QuickForm
6
*/
7
class SelectTheme extends HTML_QuickForm_select
8
{
9
	/**
10
	 * Class constructor
11
	 */
12
    public function __construct($elementName = null, $elementLabel = null, $options = null, $attributes = null)
13
    {
14
		parent::__construct($elementName, $elementLabel, $options, $attributes);
15
		// Get all languages
16
		$themes = api_get_themes();
17
		$this->_options = array();
18
		$this->_values = array();
0 ignored issues
show
Documentation Bug introduced by
It seems like array() of type array is incompatible with the declared type string of property $_values.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
19
		$this->addOption('--',''); // no theme select
20
		for ($i=0; $i < count($themes[0]); $i++) {
21
			$this->addOption($themes[1][$i],$themes[0][$i]);
22
		}
23
	}
24
}
25