Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 15 |
Ratio | 100 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
39 | View Code Duplication | public function toArray() |
|
40 | { |
||
41 | $options = array( |
||
42 | 'selector' => $this->getSelector(), |
||
43 | ); |
||
44 | |||
45 | // Remove options with empty values |
||
46 | $cleanedOptions = array(); |
||
47 | foreach ($options as $name=>$value) { |
||
48 | if ($value!==null) |
||
49 | $cleanedOptions[$name] = $value; |
||
50 | } |
||
51 | |||
52 | return $cleanedOptions; |
||
53 | } |
||
54 | |||
75 |