Completed
Push — 4.0 ( 0ca36c...7855d8 )
by Marco
12:29
created
src/Comodojo/Dispatcher/Components/Parameters.php 1 patch
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,16 +28,16 @@
 block discarded – undo
28 28
 
29 29
     final public function get($parameter=null) {
30 30
 
31
-        if ( is_null($parameter) ) return $this->parameters;
32
-
33
-        else if ( array_key_exists($parameter, $this->parameters) ) {
31
+        if ( is_null($parameter) ) {
32
+            return $this->parameters;
33
+        } else if ( array_key_exists($parameter, $this->parameters) ) {
34 34
 
35 35
             return $this->parameters[$parameter];
36 36
 
37
+        } else {
38
+            return null;
37 39
         }
38 40
 
39
-        else return null;
40
-
41 41
     }
42 42
 
43 43
     final public function set($parameter, $value) {
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Request/Headers.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,9 @@
 block discarded – undo
41 41
      */
42 42
     private static function getHeaders() {
43 43
 
44
-        if ( function_exists('getallheaders') ) return getallheaders();
44
+        if ( function_exists('getallheaders') ) {
45
+            return getallheaders();
46
+        }
45 47
 
46 48
         $headers = array();
47 49
 
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Router/Collector.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,8 +96,9 @@  discard block
 block discarded – undo
96 96
                 $this->response
97 97
             );
98 98
             
99
+        } else {
100
+            return null;
99 101
         }
100
-        else return null;
101 102
         
102 103
     }
103 104
 
@@ -183,7 +184,9 @@  discard block
 block discarded – undo
183 184
                 
184 185
                 if (preg_match('/' . $value['regex'] . '/', $bits[$key], $matches)) {
185 186
                     
186
-                    if (count($matches) == 1) $matches = $matches[0];
187
+                    if (count($matches) == 1) {
188
+                        $matches = $matches[0];
189
+                    }
187 190
                     
188 191
                     $this->request->query()->set($key, $matches);
189 192
                     
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Router/RoutingTable.php 1 patch
Braces   +8 added lines, -5 removed lines patch added patch discarded remove patch
@@ -73,10 +73,11 @@  discard block
 block discarded – undo
73 73
 
74 74
         $regex = $this->readpath($folders);
75 75
 
76
-        if (isset($this->routes[$regex]))
77
-            return $this->routes[$regex];
78
-        else
79
-            return null;
76
+        if (isset($this->routes[$regex])) {
77
+                    return $this->routes[$regex];
78
+        } else {
79
+                    return null;
80
+        }
80 81
 
81 82
     }
82 83
 
@@ -86,7 +87,9 @@  discard block
 block discarded – undo
86 87
 
87 88
         $regex = $this->readpath($folders);
88 89
 
89
-        if (isset($this->routes[$regex])) unset($this->routes[$regex]);
90
+        if (isset($this->routes[$regex])) {
91
+            unset($this->routes[$regex]);
92
+        }
90 93
 
91 94
     }
92 95
 
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Service/AbstractService.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,9 @@
 block discarded – undo
104 104
 
105 105
         foreach ( $supported_methods as $method ) {
106 106
 
107
-            if ( method_exists($this, strtolower($method)) ) array_push($implemented_methods,$method);
107
+            if ( method_exists($this, strtolower($method)) ) {
108
+                array_push($implemented_methods,$method);
109
+            }
108 110
 
109 111
         }
110 112
 
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Components/Headers.php 1 patch
Braces   +10 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,11 +29,13 @@  discard block
 block discarded – undo
29 29
 
30 30
     public function get($header = null) {
31 31
 
32
-        if ( is_null($header) ) return $this->headers;
33
-
34
-        else if ( array_key_exists($header, $this->headers) ) return $this->headers[$header];
35
-
36
-        else return null;
32
+        if ( is_null($header) ) {
33
+            return $this->headers;
34
+        } else if ( array_key_exists($header, $this->headers) ) {
35
+            return $this->headers[$header];
36
+        } else {
37
+            return null;
38
+        }
37 39
 
38 40
     }
39 41
 
@@ -50,7 +52,9 @@  discard block
 block discarded – undo
50 52
 
51 53
             return (string)($header.':'.$this->headers[$header]);
52 54
 
53
-        } else return null;
55
+        } else {
56
+            return null;
57
+        }
54 58
 
55 59
     }
56 60
 
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Components/Timestamp.php 1 patch
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,9 +35,11 @@
 block discarded – undo
35 35
 
36 36
     final public function setTimestamp($time = null) {
37 37
 
38
-        if ( is_float($time) ) $this->timestamp = $time;
39
-
40
-        else $this->timestamp = microtime(true);
38
+        if ( is_float($time) ) {
39
+            $this->timestamp = $time;
40
+        } else {
41
+            $this->timestamp = microtime(true);
42
+        }
41 43
 
42 44
         return $this;
43 45
 
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Log/DispatcherLogger.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,9 @@
 block discarded – undo
63 63
 
64 64
                 $handler = $this->getHandler($provider, $parameters);
65 65
 
66
-                if ( $handler instanceof HandlerInterface ) $logger->pushHandler($handler);
66
+                if ( $handler instanceof HandlerInterface ) {
67
+                    $logger->pushHandler($handler);
68
+                }
67 69
 
68 70
             }
69 71
 
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Cache/DispatcherCache.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,9 @@
 block discarded – undo
64 64
 
65 65
                     $handler = $this->getHandler($provider, $parameters);
66 66
 
67
-                    if ( $handler instanceof CacheInterface ) $manager->addProvider($handler);
67
+                    if ( $handler instanceof CacheInterface ) {
68
+                        $manager->addProvider($handler);
69
+                    }
68 70
 
69 71
                 }
70 72
 
Please login to merge, or discard this patch.