summaryrefslogtreecommitdiff
path: root/src/Exceptions
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2019-11-10 23:26:23 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2019-11-11 00:05:41 +0100
commit68afc74b03f83bb072944911c15af60433280ace (patch)
tree1217a5cbfa75c01d35e8e0d743da379725816bf2 /src/Exceptions
parentb878740f80ce7cfe2a0bc53956e3f7e4e0aa2f78 (diff)
Formatting to follow PSR-12
Diffstat (limited to 'src/Exceptions')
-rw-r--r--src/Exceptions/Handler.php7
-rw-r--r--src/Exceptions/Handlers/Legacy.php2
-rw-r--r--src/Exceptions/Handlers/LegacyDevelopment.php6
3 files changed, 11 insertions, 4 deletions
diff --git a/src/Exceptions/Handler.php b/src/Exceptions/Handler.php
index b3d840c0..f8905531 100644
--- a/src/Exceptions/Handler.php
+++ b/src/Exceptions/Handler.php
@@ -18,8 +18,11 @@ class Handler
/** @var Request */
protected $request;
- const ENV_PRODUCTION = 'prod';
- const ENV_DEVELOPMENT = 'dev';
+ /** @var string */
+ public const ENV_PRODUCTION = 'prod';
+
+ /** @var string */
+ public const ENV_DEVELOPMENT = 'dev';
/**
* Handler constructor.
diff --git a/src/Exceptions/Handlers/Legacy.php b/src/Exceptions/Handlers/Legacy.php
index 461dabe1..45285a8d 100644
--- a/src/Exceptions/Handlers/Legacy.php
+++ b/src/Exceptions/Handlers/Legacy.php
@@ -13,7 +13,7 @@ class Legacy implements HandlerInterface
*/
public function render($request, Throwable $e)
{
- echo 'An <del>un</del>expected error occurred, a team of untrained monkeys has been dispatched to deal with it.';
+ echo 'An <del>un</del>expected error occurred. A team of untrained monkeys has been dispatched to fix it.';
}
/**
diff --git a/src/Exceptions/Handlers/LegacyDevelopment.php b/src/Exceptions/Handlers/LegacyDevelopment.php
index cfa4efa4..d6a11949 100644
--- a/src/Exceptions/Handlers/LegacyDevelopment.php
+++ b/src/Exceptions/Handlers/LegacyDevelopment.php
@@ -15,7 +15,11 @@ class LegacyDevelopment extends Legacy
{
$file = $this->stripBasePath($e->getFile());
- echo '<pre style="background-color:#333;color:#ccc;z-index:1000;position:fixed;bottom:1em;padding:1em;width:97%;max-height: 90%;overflow-y:auto;">';
+ echo sprintf(
+ '<pre style="%s">',
+ 'background-color:#333;color:#ccc;z-index:1000;position:fixed;'
+ . 'bottom:1em;padding:1em;width:97%;max-height:90%;overflow-y:auto;'
+ );
echo sprintf('%s: (%s)' . PHP_EOL, get_class($e), $e->getCode());
$data = [
'string' => $e->getMessage(),