Passed
Push — master ( 151829...e135ef )
by Francis
02:02
created
src/LiveStream/Resources/Resource.php 1 patch
Braces   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public function __construct(bool $init = true)
23 23
     {
24
-        if ($init) $this->data = new stdClass();
24
+        if ($init) {
25
+            $this->data = new stdClass();
26
+        }
25 27
     }
26 28
 
27 29
     /**
@@ -99,8 +101,9 @@  discard block
 block discarded – undo
99 101
      */
100 102
     private function get_called_value(string $function)
101 103
     {
102
-        if (!isset($this->data->{lcfirst(substr($function, 3, strlen($function) - 3))}))
103
-            throw new BadMethodCallException("Function '$function' does not exist.");
104
+        if (!isset($this->data->{lcfirst(substr($function, 3, strlen($function) - 3))})) {
105
+                    throw new BadMethodCallException("Function '$function' does not exist.");
106
+        }
104 107
 
105 108
         return $this->data->{lcfirst(substr($function, 3, strlen($function) - 3))};
106 109
     }
@@ -114,8 +117,9 @@  discard block
 block discarded – undo
114 117
      */
115 118
     private function set_called_value(string $function, $value): void
116 119
     {
117
-        if (!isset($this->data->{lcfirst(substr($function, 3, strlen($function) - 3))}))
118
-            throw new BadMethodCallException("Function '$function' does not exist.");
120
+        if (!isset($this->data->{lcfirst(substr($function, 3, strlen($function) - 3))})) {
121
+                    throw new BadMethodCallException("Function '$function' does not exist.");
122
+        }
119 123
 
120 124
         $this->data->{lcfirst(substr($function, 3, strlen($function) - 3))} = $value;
121 125
     }
Please login to merge, or discard this patch.