Completed
Pull Request — master (#607)
by Tortue
03:28
created

Switchbox   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A switches() 0 10 2
1
<?php
2
namespace Former\Form\Fields;
3
4
class Switchbox extends Checkbox
5
{
6
	////////////////////////////////////////////////////////////////////
7
	////////////////////////// FIELD METHODS ///////////////////////////
8
	////////////////////////////////////////////////////////////////////
9
10
	/**
11
	 * Create a serie of switches
12
	 */
13
	public function switches()
14
	{
15
		if ($this->isGrouped()) {
16
			// Remove any possible items added by the Populator.
17
			$this->items = array();
18
		}
19
		$this->items(func_get_args());
20
21
		return $this;
22
	}
23
}
24