Completed
Push — master ( 3d345a...4bdd65 )
by Askupa
01:39
created
components/switch/controller.php 4 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
      * handle this.
44 44
      *
45 45
      * @param [string] $v
46
-     * @return void
46
+     * @return string
47 47
      */
48 48
     public function filter($v)
49 49
     {
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,8 @@
 block discarded – undo
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
     
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
             'required'      => false,
23 23
             'readonly'      => false,
24 24
             'default'       => null,
25
-            'filter'        => array( $this, 'filter' )
25
+            'filter'        => array($this, 'filter')
26 26
         );
27 27
     }
28 28
     
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function filter($v)
49 49
     {
50
-        if($v !== 'on') return 'off';
50
+        if ($v !== 'on') return 'off';
51 51
         return 'on';
52 52
     }
53 53
 }
54 54
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,9 @@
 block discarded – undo
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
Please login to merge, or discard this patch.