@@ -156,8 +156,7 @@ |
||
| 156 | 156 | if (Request::current()->is_ajax()) |
| 157 | 157 | { |
| 158 | 158 | return false; |
| 159 | - } |
|
| 160 | - else |
|
| 159 | + } else |
|
| 161 | 160 | { |
| 162 | 161 | return true; |
| 163 | 162 | } |
@@ -28,8 +28,9 @@ discard block |
||
| 28 | 28 | public static function factory($file = NULL, array $data = NULL) |
| 29 | 29 | { |
| 30 | 30 | // Return a raw view object if no template is specified. |
| 31 | - if ($file === FALSE) |
|
| 32 | - return new View(FALSE, $data); |
|
| 31 | + if ($file === FALSE) { |
|
| 32 | + return new View(FALSE, $data); |
|
| 33 | + } |
|
| 33 | 34 | |
| 34 | 35 | $class = 'View_'.strtr($file, '/', '_'); |
| 35 | 36 | |
@@ -63,8 +64,7 @@ discard block |
||
| 63 | 64 | try |
| 64 | 65 | { |
| 65 | 66 | include 'kohana.view://'.$kohana_view_filename; |
| 66 | - } |
|
| 67 | - catch (Exception $e) |
|
| 67 | + } catch (Exception $e) |
|
| 68 | 68 | { |
| 69 | 69 | // Delete the output buffer |
| 70 | 70 | ob_end_clean(); |
@@ -126,12 +126,10 @@ discard block |
||
| 126 | 126 | if (method_exists($this, $key)) |
| 127 | 127 | { |
| 128 | 128 | return $this->$key(); |
| 129 | - } |
|
| 130 | - elseif (property_exists($this, $key)) |
|
| 129 | + } elseif (property_exists($this, $key)) |
|
| 131 | 130 | { |
| 132 | 131 | return $this->$key; |
| 133 | - } |
|
| 134 | - else |
|
| 132 | + } else |
|
| 135 | 133 | { |
| 136 | 134 | throw new Kohana_Exception('View variable is not set: :var', [':var' => $key]); |
| 137 | 135 | } |
@@ -163,8 +161,7 @@ discard block |
||
| 163 | 161 | try |
| 164 | 162 | { |
| 165 | 163 | return $this->render(); |
| 166 | - } |
|
| 167 | - catch (Exception $e) |
|
| 164 | + } catch (Exception $e) |
|
| 168 | 165 | { |
| 169 | 166 | // Display the exception message |
| 170 | 167 | Kohana_Exception::handler($e); |
@@ -221,8 +218,7 @@ discard block |
||
| 221 | 218 | { |
| 222 | 219 | $this->{$name} = $value; |
| 223 | 220 | } |
| 224 | - } |
|
| 225 | - else |
|
| 221 | + } else |
|
| 226 | 222 | { |
| 227 | 223 | $this->{$key} = $value; |
| 228 | 224 | } |
@@ -134,8 +134,7 @@ discard block |
||
| 134 | 134 | if (substr($var, 0, 1) != $this->_raw_output_char) |
| 135 | 135 | { |
| 136 | 136 | return '<?php echo '.$this->_encode_method.'('.$var.'); ?>'; |
| 137 | - } |
|
| 138 | - else |
|
| 137 | + } else |
|
| 139 | 138 | { |
| 140 | 139 | // Remove the "turn off escape" character |
| 141 | 140 | return '<?php echo '.substr($var, strlen($this->_raw_output_char), strlen($var)-1).'; ?>'; |
@@ -198,8 +197,7 @@ discard block |
||
| 198 | 197 | { |
| 199 | 198 | $this->_pos = $offset; |
| 200 | 199 | return true; |
| 201 | - } |
|
| 202 | - else |
|
| 200 | + } else |
|
| 203 | 201 | { |
| 204 | 202 | return false; |
| 205 | 203 | } |
@@ -210,8 +208,7 @@ discard block |
||
| 210 | 208 | { |
| 211 | 209 | $this->_pos += $offset; |
| 212 | 210 | return true; |
| 213 | - } |
|
| 214 | - else |
|
| 211 | + } else |
|
| 215 | 212 | { |
| 216 | 213 | return false; |
| 217 | 214 | } |
@@ -222,8 +219,7 @@ discard block |
||
| 222 | 219 | { |
| 223 | 220 | $this->_pos = strlen($this->_data) + $offset; |
| 224 | 221 | return true; |
| 225 | - } |
|
| 226 | - else |
|
| 222 | + } else |
|
| 227 | 223 | { |
| 228 | 224 | return false; |
| 229 | 225 | } |