Passed
Branch main (74a165)
by Sammy
06:35
created
Smith.php 1 patch
Braces   +14 added lines, -10 removed lines patch added patch discarded remove patch
@@ -34,27 +34,31 @@
 block discarded – undo
34 34
 
35 35
   public function filters($filter_name=null, $value=null)
36 36
   {
37
-    if(is_null($filter_name))
38
-      return $_SESSION[$this->index_filter];
37
+    if(is_null($filter_name)) {
38
+          return $_SESSION[$this->index_filter];
39
+    }
39 40
 
40
-    if(!is_null($value))
41
-      $_SESSION[$this->index_filter][$filter_name] = $value;
41
+    if(!is_null($value)) {
42
+          $_SESSION[$this->index_filter][$filter_name] = $value;
43
+    }
42 44
 
43 45
     return $_SESSION[$this->index_filter][$filter_name] ?? null;
44 46
   }
45 47
 
46 48
   public function reset_filters($filter_name=null)
47 49
   {
48
-    if(is_null($filter_name))
49
-      $_SESSION[$this->index_filter]=[];
50
-    else
51
-      unset($_SESSION[$this->index_filter][$filter_name]);
50
+    if(is_null($filter_name)) {
51
+          $_SESSION[$this->index_filter]=[];
52
+    } else {
53
+          unset($_SESSION[$this->index_filter][$filter_name]);
54
+    }
52 55
   }
53 56
 
54 57
   public function operator_id($setter = null)
55 58
   {
56
-    if(!is_null($setter))
57
-      $_SESSION[$this->index_operator] = ['id' => $setter, 'set_on' => time()];
59
+    if(!is_null($setter)) {
60
+          $_SESSION[$this->index_operator] = ['id' => $setter, 'set_on' => time()];
61
+    }
58 62
 
59 63
     return $_SESSION[$this->index_operator]['id'] ?? null;
60 64
   }
Please login to merge, or discard this patch.