@@ -30,45 +30,45 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | trait Extensions |
| 32 | 32 | { |
| 33 | - /** |
|
| 34 | - * The file extension. |
|
| 35 | - * |
|
| 36 | - * @var array $extension |
|
| 37 | - */ |
|
| 38 | - protected $extension = [ |
|
| 39 | - 'plaze.php', |
|
| 40 | - 'php', |
|
| 41 | - 'html', |
|
| 42 | - ]; |
|
| 33 | + /** |
|
| 34 | + * The file extension. |
|
| 35 | + * |
|
| 36 | + * @var array $extension |
|
| 37 | + */ |
|
| 38 | + protected $extension = [ |
|
| 39 | + 'plaze.php', |
|
| 40 | + 'php', |
|
| 41 | + 'html', |
|
| 42 | + ]; |
|
| 43 | 43 | |
| 44 | - /** |
|
| 45 | - * The type to engine bindings. |
|
| 46 | - * |
|
| 47 | - * @var array $extensions |
|
| 48 | - */ |
|
| 49 | - protected $extensions = [ |
|
| 50 | - 'plaze.php' => 'plaze', |
|
| 51 | - 'php' => 'php', |
|
| 52 | - 'html' => 'file', |
|
| 53 | - ]; |
|
| 44 | + /** |
|
| 45 | + * The type to engine bindings. |
|
| 46 | + * |
|
| 47 | + * @var array $extensions |
|
| 48 | + */ |
|
| 49 | + protected $extensions = [ |
|
| 50 | + 'plaze.php' => 'plaze', |
|
| 51 | + 'php' => 'php', |
|
| 52 | + 'html' => 'file', |
|
| 53 | + ]; |
|
| 54 | 54 | |
| 55 | - /** |
|
| 56 | - * Get the template file extension. |
|
| 57 | - * |
|
| 58 | - * @return array |
|
| 59 | - */ |
|
| 60 | - public function getExtensions() |
|
| 61 | - { |
|
| 62 | - return $this->extension; |
|
| 63 | - } |
|
| 55 | + /** |
|
| 56 | + * Get the template file extension. |
|
| 57 | + * |
|
| 58 | + * @return array |
|
| 59 | + */ |
|
| 60 | + public function getExtensions() |
|
| 61 | + { |
|
| 62 | + return $this->extension; |
|
| 63 | + } |
|
| 64 | 64 | |
| 65 | - /** |
|
| 66 | - * Get type to engine bindings. |
|
| 67 | - * |
|
| 68 | - * @return array |
|
| 69 | - */ |
|
| 70 | - public function getKeysToExtensions() |
|
| 71 | - { |
|
| 72 | - return array_keys($this->extensions); |
|
| 73 | - } |
|
| 65 | + /** |
|
| 66 | + * Get type to engine bindings. |
|
| 67 | + * |
|
| 68 | + * @return array |
|
| 69 | + */ |
|
| 70 | + public function getKeysToExtensions() |
|
| 71 | + { |
|
| 72 | + return array_keys($this->extensions); |
|
| 73 | + } |
|
| 74 | 74 | } |
| 75 | 75 | \ No newline at end of file |
@@ -36,10 +36,10 @@ |
||
| 36 | 36 | class LogManager implements LoggerInterface |
| 37 | 37 | { |
| 38 | 38 | /** |
| 39 | - * The application implementation. |
|
| 40 | - * |
|
| 41 | - * @var \Syscodes\Contracts\Core\Application $app |
|
| 42 | - */ |
|
| 39 | + * The application implementation. |
|
| 40 | + * |
|
| 41 | + * @var \Syscodes\Contracts\Core\Application $app |
|
| 42 | + */ |
|
| 43 | 43 | protected $app; |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -40,10 +40,10 @@ |
||
| 40 | 40 | use ParseLogEnvironment; |
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | - * The application implementation. |
|
| 44 | - * |
|
| 45 | - * @var \Syscodes\Contracts\Core\Application $app |
|
| 46 | - */ |
|
| 43 | + * The application implementation. |
|
| 44 | + * |
|
| 45 | + * @var \Syscodes\Contracts\Core\Application $app |
|
| 46 | + */ |
|
| 47 | 47 | protected $app; |
| 48 | 48 | |
| 49 | 49 | /** |
@@ -156,7 +156,7 @@ |
||
| 156 | 156 | |
| 157 | 157 | foreach ($context as $key => $value) { |
| 158 | 158 | if ($key === 'exception' && $value instanceof Throwable) { |
| 159 | - $value = $value->getMessage() . ' ' . $this->cleanFileNames($value->getFile()) . ':' . $value->getLine(); |
|
| 159 | + $value = $value->getMessage().' '.$this->cleanFileNames($value->getFile()).':'.$value->getLine(); |
|
| 160 | 160 | // Todo - sanitize input before writing to file? |
| 161 | 161 | $replace["{{$key}}"] = $value; |
| 162 | 162 | } elseif (null === $value || is_scalar($value) || (is_object($value) && method_exists($value, '__toString'))) { |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | public function register() |
| 41 | 41 | { |
| 42 | - $this->app->singleton('log', function () { |
|
| 42 | + $this->app->singleton('log', function() { |
|
| 43 | 43 | return new LogManager($this->app); |
| 44 | 44 | }); |
| 45 | 45 | } |
@@ -37,8 +37,11 @@ |
||
| 37 | 37 | <div id="frame-code-args-<?=$index?>" class="code-block frame-args"> |
| 38 | 38 | <?= $frameArgs ?> |
| 39 | 39 | </div> |
| 40 | - <?php else: ?> |
|
| 40 | + <?php else { |
|
| 41 | + : ?> |
|
| 41 | 42 | <div class="frame-noArgument"><?= e(__('exception.noArguments')) ?></div> |
| 42 | - <?php endif; ?> |
|
| 43 | + <?php endif; |
|
| 44 | +} |
|
| 45 | +?> |
|
| 43 | 46 | </div> |
| 44 | 47 | <?php endforeach; ?> |
| 45 | 48 | \ No newline at end of file |
@@ -21,10 +21,13 @@ |
||
| 21 | 21 | <?php endforeach; ?> |
| 22 | 22 | </tbody> |
| 23 | 23 | </table> |
| 24 | - <?php else : ?> |
|
| 24 | + <?php else { |
|
| 25 | + : ?> |
|
| 25 | 26 | <label class="empty"><?= e($label) ?></label> |
| 26 | 27 | <span class="empty"><?= e(__('exception.empty')) ?></span> |
| 27 | - <?php endif; ?> |
|
| 28 | + <?php endif; |
|
| 29 | +} |
|
| 30 | +?> |
|
| 28 | 31 | </div> |
| 29 | 32 | <?php endforeach; ?> |
| 30 | 33 | </div> |
@@ -12,7 +12,8 @@ discard block |
||
| 12 | 12 | <div class="frame-info-class"> |
| 13 | 13 | <?php if ($frame->getClass() == '') : ?> |
| 14 | 14 | <span class="frame-function"><?= e($frame->getFunction()) ?></span> |
| 15 | - <?php else: ?> |
|
| 15 | + <?php else { |
|
| 16 | + : ?> |
|
| 16 | 17 | <span class="frame-class"><?= e($frame->getClass()) ?></span> |
| 17 | 18 | <?php if ($frame->getFunction() != '') : ?> |
| 18 | 19 | <span class="frame-function"><?= e($frame->getFunction()) ?></span> |
@@ -26,5 +27,7 @@ discard block |
||
| 26 | 27 | </div> |
| 27 | 28 | |
| 28 | 29 | </div> |
| 29 | -<?php endforeach; ?> |
|
| 30 | +<?php endforeach; |
|
| 31 | +} |
|
| 32 | +?> |
|
| 30 | 33 | </div> |
| 31 | 34 | \ No newline at end of file |
@@ -4,9 +4,12 @@ |
||
| 4 | 4 | <?php foreach ($class as $i => $name) : ?> |
| 5 | 5 | <?php if ($i == count($class) - 1): ?> |
| 6 | 6 | <h1><?= $template->escape($name) ?></h1> |
| 7 | - <?php else: ?> |
|
| 7 | + <?php else { |
|
| 8 | + : ?> |
|
| 8 | 9 | <?= $template->escape($name).' \\' ?> |
| 9 | - <?php endif; ?> |
|
| 10 | + <?php endif; |
|
| 11 | +} |
|
| 12 | +?> |
|
| 10 | 13 | <?php endforeach; ?> |
| 11 | 14 | <?php if ($code): ?> |
| 12 | 15 | <span class="subtitle" title="Exception Code">(<?= $template->escape($code) ?>)</span> |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | */ |
| 52 | 52 | public function __construct(array $frames) |
| 53 | 53 | { |
| 54 | - $this->frames = array_map(function ($frame) { |
|
| 54 | + $this->frames = array_map(function($frame) { |
|
| 55 | 55 | return new Frame($frame); |
| 56 | 56 | }, $frames); |
| 57 | 57 | } |