@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | } else { |
186 | 186 | $logger->info('Cannot find view [' . $view . '] in module [' . $module . '] using the default location'); |
187 | 187 | } |
188 | - if (!$path) { |
|
188 | + if (!$path) { |
|
189 | 189 | $path = $this->getDefaultFilePathForView($viewFile); |
190 | 190 | } |
191 | 191 | $logger->info('The view file path to be loaded is [' . $path . ']'); |
@@ -340,12 +340,12 @@ discard block |
||
340 | 340 | ob_end_flush(); |
341 | 341 | } |
342 | 342 | |
343 | - /** |
|
344 | - * Return the default full file path for view |
|
345 | - * @param string $file the filename |
|
346 | - * |
|
347 | - * @return string|null the full file path |
|
348 | - */ |
|
343 | + /** |
|
344 | + * Return the default full file path for view |
|
345 | + * @param string $file the filename |
|
346 | + * |
|
347 | + * @return string|null the full file path |
|
348 | + */ |
|
349 | 349 | protected static function getDefaultFilePathForView($file){ |
350 | 350 | $searchDir = array(APPS_VIEWS_PATH, CORE_VIEWS_PATH); |
351 | 351 | $fullFilePath = null; |
@@ -535,18 +535,18 @@ discard block |
||
535 | 535 | } |
536 | 536 | } |
537 | 537 | |
538 | - /** |
|
539 | - * Set the mandory headers, like security, etc. |
|
540 | - */ |
|
538 | + /** |
|
539 | + * Set the mandory headers, like security, etc. |
|
540 | + */ |
|
541 | 541 | protected static function setRequiredHeaders() { |
542 | 542 | $requiredHeaders = array( |
543 | 543 | 'X-XSS-Protection' => '1; mode=block', |
544 | 544 | 'X-Frame-Options' => 'SAMEORIGIN' |
545 | 545 | ); |
546 | 546 | foreach ($requiredHeaders as $key => $value) { |
547 | - if (!isset(self::$headers[$key])) { |
|
547 | + if (!isset(self::$headers[$key])) { |
|
548 | 548 | self::$headers[$key] = $value; |
549 | - } |
|
549 | + } |
|
550 | 550 | } |
551 | 551 | } |
552 | 552 | } |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | * |
347 | 347 | * @return string|null the full file path |
348 | 348 | */ |
349 | - protected static function getDefaultFilePathForView($file){ |
|
349 | + protected static function getDefaultFilePathForView($file) { |
|
350 | 350 | $searchDir = array(APPS_VIEWS_PATH, CORE_VIEWS_PATH); |
351 | 351 | $fullFilePath = null; |
352 | 352 | foreach ($searchDir as $dir) { |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | // Parse out the elapsed time and memory usage, |
466 | 466 | // then swap the pseudo-variables with the data |
467 | 467 | $elapsedTime = $benchmark->elapsedTime('APP_EXECUTION_START', 'APP_EXECUTION_END'); |
468 | - $memoryUsage = round($benchmark->memoryUsage('APP_EXECUTION_START', 'APP_EXECUTION_END') / 1024 / 1024, 6) . 'MB'; |
|
468 | + $memoryUsage = round($benchmark->memoryUsage('APP_EXECUTION_START', 'APP_EXECUTION_END') / 1024 / 1024, 6) . 'MB'; |
|
469 | 469 | return str_replace(array('{elapsed_time}', '{memory_usage}'), array($elapsedTime, $memoryUsage), $content); |
470 | 470 | } |
471 | 471 |