mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-22 00:56:08 +02:00
Removed unnecessary php version checks after php dependency bump to 7.0
This commit is contained in:
@@ -132,10 +132,7 @@ class HtmlFormatter extends NormalizerFormatter
|
||||
}
|
||||
|
||||
$data = $this->normalize($data);
|
||||
if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
|
||||
return json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
|
||||
return str_replace('\\/', '/', json_encode($data));
|
||||
return json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
}
|
||||
|
@@ -141,11 +141,7 @@ class LineFormatter extends NormalizerFormatter
|
||||
return (string) $data;
|
||||
}
|
||||
|
||||
if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
|
||||
return $this->toJson($data, true);
|
||||
}
|
||||
|
||||
return str_replace('\\/', '/', @json_encode($data));
|
||||
return $this->toJson($data, true);
|
||||
}
|
||||
|
||||
protected function replaceNewlines($str)
|
||||
|
@@ -168,11 +168,7 @@ class NormalizerFormatter implements FormatterInterface
|
||||
*/
|
||||
private function jsonEncode($data)
|
||||
{
|
||||
if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
|
||||
return json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
|
||||
return json_encode($data);
|
||||
return json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user