Completed
Push — master ( 8dd423...4c2657 )
by Alejandro
06:28
created
src/Route.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,8 +72,9 @@
 block discarded – undo
72 72
     }
73 73
 
74 74
     public function setCallable($callback) {
75
-        if (is_callable($callback))
76
-            $this->callable = $callback;
75
+        if (is_callable($callback)) {
76
+                    $this->callable = $callback;
77
+        }
77 78
     }
78 79
 
79 80
     /**
Please login to merge, or discard this patch.
src/Utils.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,9 @@
 block discarded – undo
36 36
 
37 37
     public static function removeSubstring($string, $substrToRemove) {
38 38
         $firstIndex = strpos($string, $substrToRemove);
39
-        if ($firstIndex === FALSE)
40
-            return $string;
39
+        if ($firstIndex === FALSE) {
40
+                    return $string;
41
+        }
41 42
         $lastIndex = $firstIndex + strlen($substrToRemove);
42 43
         $pre = substr($string, 0, $firstIndex);
43 44
         $post = substr($string, $lastIndex);
Please login to merge, or discard this patch.
src/Tight.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,10 +48,12 @@
 block discarded – undo
48 48
      */
49 49
     public function __construct($config = []) {
50 50
         set_exception_handler([$this, "exceptionHandler"]);
51
-        if (is_array($config))
52
-            $config = new \Tight\TightConfig($config);
53
-        if (!$config instanceof \Tight\TightConfig)
54
-            throw new \InvalidArgumentException("Argument passed to Tight::__constructor must be array or <b>\Tight\TightConfig</b> object");
51
+        if (is_array($config)) {
52
+                    $config = new \Tight\TightConfig($config);
53
+        }
54
+        if (!$config instanceof \Tight\TightConfig) {
55
+                    throw new \InvalidArgumentException("Argument passed to Tight::__constructor must be array or <b>\Tight\TightConfig</b> object");
56
+        }
55 57
         $this->config = $config;
56 58
         $this->router = new Router($config->basePath);
57 59
     }
Please login to merge, or discard this patch.
src/TightConfig.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,10 +44,11 @@
 block discarded – undo
44 44
         }
45 45
     }
46 46
     public function __get($name) {
47
-        if(isset($this->config[$name]))
48
-            return $this->config[$name];
49
-        else
50
-            return null;
47
+        if(isset($this->config[$name])) {
48
+                    return $this->config[$name];
49
+        } else {
50
+                    return null;
51
+        }
51 52
     }
52 53
     public function __set($name, $value) {
53 54
         $this->config[$name] = $value;
Please login to merge, or discard this patch.