@@ -8,8 +8,8 @@ |
||
| 8 | 8 | class Component_switch |
| 9 | 9 | extends AbstractComponent |
| 10 | 10 | implements ValueComponentInterface, |
| 11 | - DisableableComponentInterface, |
|
| 12 | - FilterableComponentInterface |
|
| 11 | + DisableableComponentInterface, |
|
| 12 | + FilterableComponentInterface |
|
| 13 | 13 | { |
| 14 | 14 | public $component_type = 'switch'; |
| 15 | 15 | |
@@ -47,7 +47,9 @@ |
||
| 47 | 47 | */ |
| 48 | 48 | public function filter($v) |
| 49 | 49 | { |
| 50 | - if($v !== 'on') return 'off'; |
|
| 50 | + if($v !== 'on') { |
|
| 51 | + return 'off'; |
|
| 52 | + } |
|
| 51 | 53 | return 'on'; |
| 52 | 54 | } |
| 53 | 55 | } |
| 54 | 56 | \ No newline at end of file |