@@ -61,10 +61,11 @@ discard block |
||
61 | 61 | |
62 | 62 | public function getLocalName() { |
63 | 63 | |
64 | - if (!empty($this->path)) |
|
65 | - return $this->path . "/" . $this->slug; |
|
66 | - else |
|
67 | - return ''; |
|
64 | + if (!empty($this->path)) { |
|
65 | + return $this->path . "/" . $this->slug; |
|
66 | + } else { |
|
67 | + return ''; |
|
68 | + } |
|
68 | 69 | |
69 | 70 | } |
70 | 71 | |
@@ -102,8 +103,9 @@ discard block |
||
102 | 103 | |
103 | 104 | $file = $this->getTemporaryName(); |
104 | 105 | |
105 | - if (file_exists($file)) |
|
106 | - return file_get_contents($file); |
|
106 | + if (file_exists($file)) { |
|
107 | + return file_get_contents($file); |
|
108 | + } |
|
107 | 109 | |
108 | 110 | throw new DispatcherException("File does not exists"); |
109 | 111 |
@@ -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,7 +140,9 @@ 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 | |
@@ -157,7 +160,9 @@ discard block |
||
157 | 160 | |
158 | 161 | private function dumpCache() { |
159 | 162 | |
160 | - if ( $this->configuration->get('routing-table-cache') !== true ) return; |
|
163 | + if ( $this->configuration->get('routing-table-cache') !== true ) { |
|
164 | + return; |
|
165 | + } |
|
161 | 166 | |
162 | 167 | $ttl = $this->configuration->get('routing-table-ttl'); |
163 | 168 |