@@ -33,7 +33,7 @@ |
||
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | 35 | * @param string $file |
| 36 | - * @return bool|string |
|
| 36 | + * @return string|false |
|
| 37 | 37 | */ |
| 38 | 38 | public function locate($file) |
| 39 | 39 | { |
@@ -140,7 +140,9 @@ discard block |
||
| 140 | 140 | */ |
| 141 | 141 | public function __get($name) |
| 142 | 142 | { |
| 143 | - if ($name === 'section') return $this->section; |
|
| 143 | + if ($name === 'section') { |
|
| 144 | + return $this->section; |
|
| 145 | + } |
|
| 144 | 146 | return $this->service($name); |
| 145 | 147 | } |
| 146 | 148 | |
@@ -201,11 +203,9 @@ discard block |
||
| 201 | 203 | foreach($file as $key => $val) { |
| 202 | 204 | $this->section->set($key, $val); |
| 203 | 205 | } |
| 204 | - } |
|
| 205 | - elseif(!$this->view_file = $this->getPath($file)) { |
|
| 206 | + } elseif(!$this->view_file = $this->getPath($file)) { |
|
| 206 | 207 | return null; |
| 207 | - } |
|
| 208 | - else { |
|
| 208 | + } else { |
|
| 209 | 209 | $this->setContent($this->renderViewFile()); |
| 210 | 210 | } |
| 211 | 211 | if (!isset($this->layout_file)) { |