Kirki_Field_Color_Alpha   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 12
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A set_choices() 0 5 2
1
<?php
2
/**
3
 * Override field methods
4
 *
5
 * @package     Kirki
6
 * @subpackage  Controls
7
 * @copyright   Copyright (c) 2017, Aristeides Stathopoulos
8
 * @license    https://opensource.org/licenses/MIT
9
 * @since       2.2.7
10
 */
11
12
/**
13
 * Field overrides.
14
 */
15
class Kirki_Field_Color_Alpha extends Kirki_Field_Color {
16
17
	/**
18
	 * Sets the $choices
19
	 *
20
	 * @access protected
21
	 */
22
	protected function set_choices() {
23
		if ( ! is_array( $this->choices ) ) {
0 ignored issues
show
introduced by
The condition is_array($this->choices) is always true.
Loading history...
24
			$this->choices = array();
25
		}
26
		$this->choices['alpha'] = true;
27
	}
28
}
29