@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * This file is part of the PPI Framework. |
|
| 4 | - * |
|
| 5 | - * @copyright Copyright (c) 2012 Paul Dragoonis <[email protected]> |
|
| 6 | - * @license http://opensource.org/licenses/mit-license.php MIT |
|
| 7 | - * |
|
| 8 | - * @link http://www.ppi.io |
|
| 9 | - */ |
|
| 3 | + * This file is part of the PPI Framework. |
|
| 4 | + * |
|
| 5 | + * @copyright Copyright (c) 2012 Paul Dragoonis <[email protected]> |
|
| 6 | + * @license http://opensource.org/licenses/mit-license.php MIT |
|
| 7 | + * |
|
| 8 | + * @link http://www.ppi.io |
|
| 9 | + */ |
|
| 10 | 10 | |
| 11 | 11 | namespace PPI\Framework\View\Twig\Loader; |
| 12 | 12 | |
@@ -126,10 +126,10 @@ discard block |
||
| 126 | 126 | public function __construct(array $options = array()) |
| 127 | 127 | { |
| 128 | 128 | // Default options |
| 129 | - $this->environment = isset($options['environment']) && $options['environment'] ? (string)$options['environment'] : 'prod'; |
|
| 130 | - $this->debug = isset($options['debug']) && null !== $options['debug'] ? (boolean)$options['debug'] : false; |
|
| 131 | - $this->rootDir = isset($options['rootDir']) && $options['rootDir'] ? (string)$options['rootDir'] : $this->getRootDir(); |
|
| 132 | - $this->name = isset($options['name']) && $options['name'] ? (string)$options['name'] : $this->getName(); |
|
| 129 | + $this->environment = isset($options['environment']) && $options['environment'] ? (string) $options['environment'] : 'prod'; |
|
| 130 | + $this->debug = isset($options['debug']) && null !== $options['debug'] ? (boolean) $options['debug'] : false; |
|
| 131 | + $this->rootDir = isset($options['rootDir']) && $options['rootDir'] ? (string) $options['rootDir'] : $this->getRootDir(); |
|
| 132 | + $this->name = isset($options['name']) && $options['name'] ? (string) $options['name'] : $this->getName(); |
|
| 133 | 133 | |
| 134 | 134 | if ($this->debug) { |
| 135 | 135 | $this->startTime = microtime(true); |
@@ -289,9 +289,9 @@ discard block |
||
| 289 | 289 | $controllerArguments |
| 290 | 290 | ); |
| 291 | 291 | |
| 292 | - if($result === null) { |
|
| 292 | + if ($result === null) { |
|
| 293 | 293 | throw new \Exception('Your action returned null. It must always return something'); |
| 294 | - } else if(is_string($result)) { |
|
| 294 | + } else if (is_string($result)) { |
|
| 295 | 295 | $response->setContent($result); |
| 296 | 296 | } else if ($result instanceof ResponseInterface || $result instanceof SymfonyResponse) { |
| 297 | 297 | $response = $result; |