@@ -78,10 +78,11 @@ discard block |
||
78 | 78 | |
79 | 79 | $regex = $this->regex($route); |
80 | 80 | |
81 | - if (isset($this->routes[$regex])) |
|
82 | - return $this->routes[$regex]; |
|
83 | - else |
|
84 | - return null; |
|
81 | + if (isset($this->routes[$regex])) { |
|
82 | + return $this->routes[$regex]; |
|
83 | + } else { |
|
84 | + return null; |
|
85 | + } |
|
85 | 86 | |
86 | 87 | } |
87 | 88 | |
@@ -139,11 +140,15 @@ discard block |
||
139 | 140 | |
140 | 141 | private function readCache() { |
141 | 142 | |
142 | - if ( $this->configuration->get('routing-table-cache') !== true ) return; |
|
143 | + if ( $this->configuration->get('routing-table-cache') !== true ) { |
|
144 | + return; |
|
145 | + } |
|
143 | 146 | |
144 | 147 | $this->routes = $this->cache->setNamespace('dispatcherinternals')->get("dispatcher-routes"); |
145 | 148 | |
146 | - if (is_null($routes)) return; |
|
149 | + if (is_null($routes)) { |
|
150 | + return; |
|
151 | + } |
|
147 | 152 | |
148 | 153 | $this->logger->debug("Routing table loaded from cache"); |
149 | 154 | |
@@ -151,7 +156,9 @@ discard block |
||
151 | 156 | |
152 | 157 | private function dumpCache() { |
153 | 158 | |
154 | - if ( $this->configuration->get('routing-table-cache') !== true ) return; |
|
159 | + if ( $this->configuration->get('routing-table-cache') !== true ) { |
|
160 | + return; |
|
161 | + } |
|
155 | 162 | |
156 | 163 | $ttl = $this->configuration->get('routing-table-ttl'); |
157 | 164 |
@@ -102,7 +102,9 @@ |
||
102 | 102 | |
103 | 103 | public function getMessage($code) { |
104 | 104 | |
105 | - if ( $this->exists($code) ) return $this->codes[$code]; |
|
105 | + if ( $this->exists($code) ) { |
|
106 | + return $this->codes[$code]; |
|
107 | + } |
|
106 | 108 | |
107 | 109 | throw new Exception("Invalid HTTP status code $code"); |
108 | 110 |