Skip to content

Commit dae214f

Browse files
committed
ICL: Formatter simplified, unnecessary dependency removed.
1 parent c1f8828 commit dae214f

File tree

3 files changed

+5
-52
lines changed

3 files changed

+5
-52
lines changed

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"require": {
1313
"php": ">=5.4.0",
1414
"illuminate/console": "^5.2",
15-
"illuminated/helper-functions": "^0.1.1",
1615
"monolog/monolog": "^1.19"
1716
},
1817
"autoload": {

composer.lock

Lines changed: 2 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Log/Formatter.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,10 @@ public function format(array $record)
1919

2020
protected function convertToString($data)
2121
{
22-
$decoded = is_json($data, true);
23-
if ($decoded) {
24-
$data = $decoded;
22+
if (is_array($data)) {
23+
return var_export($data, true);
2524
}
2625

27-
if (is_string($data)) {
28-
return $data;
29-
}
30-
31-
return var_export($data, true);
26+
return parent::convertToString($data);
3227
}
3328
}

0 commit comments

Comments
 (0)