@@ -59,8 +59,11 @@ discard block |
||
59 | 59 | public function registerEngines(array $engines = array()) |
60 | 60 | { |
61 | 61 | foreach ($engines as $key => $value) { |
62 | - if ($value instanceof \Closure) $this->_engines[$key] = $value(); |
|
63 | - else $this->_engines[$key] = $value; |
|
62 | + if ($value instanceof \Closure) { |
|
63 | + $this->_engines[$key] = $value(); |
|
64 | + } else { |
|
65 | + $this->_engines[$key] = $value; |
|
66 | + } |
|
64 | 67 | } |
65 | 68 | } |
66 | 69 | |
@@ -73,7 +76,9 @@ discard block |
||
73 | 76 | */ |
74 | 77 | public function render($path, $data = false) |
75 | 78 | { |
76 | - if ($data === false) $data = $this->data; |
|
79 | + if ($data === false) { |
|
80 | + $data = $this->data; |
|
81 | + } |
|
77 | 82 | |
78 | 83 | // Application view |
79 | 84 | $appfile = APPPATH . 'Views' . DIRECTORY_SEPARATOR . THEME . DIRECTORY_SEPARATOR . $path . '.php'; |
@@ -147,8 +147,9 @@ discard block |
||
147 | 147 | $uri = trim($request->uri(), '/'); |
148 | 148 | // $uri = $request->uri(); |
149 | 149 | |
150 | - if ( ! preg_match($this->_route_regex, $uri, $matches)) |
|
151 | - return FALSE; |
|
150 | + if ( ! preg_match($this->_route_regex, $uri, $matches)) { |
|
151 | + return FALSE; |
|
152 | + } |
|
152 | 153 | |
153 | 154 | $params = array(); |
154 | 155 | foreach ($matches as $key => $value) |
@@ -233,13 +234,13 @@ discard block |
||
233 | 234 | } |
234 | 235 | |
235 | 236 | // Add default parameter to this result |
236 | - if (isset($defaults[$param])) |
|
237 | - return $defaults[$param]; |
|
237 | + if (isset($defaults[$param])) { |
|
238 | + return $defaults[$param]; |
|
239 | + } |
|
238 | 240 | |
239 | 241 | // This portion is missing a parameter |
240 | 242 | $missing[] = $param; |
241 | - } |
|
242 | - else |
|
243 | + } else |
|
243 | 244 | { |
244 | 245 | // Group, unwrapped |
245 | 246 | $result = $compile($matches[2], FALSE); |