Completed
Push — master ( dbac5b...8dd423 )
by Alejandro
08:15
created
src/Route.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -58,6 +58,9 @@
 block discarded – undo
58 58
     protected $pattern = "";
59 59
     protected $callable;
60 60
 
61
+    /**
62
+     * @param string $pattern
63
+     */
61 64
     public function __construct($pattern, $callable) {
62 65
         $this->setPattern($pattern);
63 66
         $this->setCallable($callable);
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.