Completed
Pull Request — master (#607)
by Tortue
01:40
created

Switchbox::switches()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
cc 2
nc 2
nop 0
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