aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Log
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-03-26 09:30:18 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-03-26 16:34:56 +0100
commitb80ebc96748b45fd2e0ba9323308657c4b00b7ec (patch)
treeec20e0ffa2f86b9b54939a83a785407319f94559 /lib/private/Log
parent62403d0932be7d620c7bdadc6b4e13eb496fcd6f (diff)
downloadnextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.tar.gz
nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.zip
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/Log')
-rw-r--r--lib/private/Log/ErrorHandler.php16
-rw-r--r--lib/private/Log/File.php2
2 files changed, 9 insertions, 9 deletions
diff --git a/lib/private/Log/ErrorHandler.php b/lib/private/Log/ErrorHandler.php
index 7561486a4a9..5d846da17ce 100644
--- a/lib/private/Log/ErrorHandler.php
+++ b/lib/private/Log/ErrorHandler.php
@@ -44,15 +44,15 @@ class ErrorHandler {
$handler = new ErrorHandler();
if ($debug) {
- set_error_handler(array($handler, 'onAll'), E_ALL);
+ set_error_handler([$handler, 'onAll'], E_ALL);
if (\OC::$CLI) {
- set_exception_handler(array('OC_Template', 'printExceptionErrorPage'));
+ set_exception_handler(['OC_Template', 'printExceptionErrorPage']);
}
} else {
- set_error_handler(array($handler, 'onError'));
+ set_error_handler([$handler, 'onError']);
}
- register_shutdown_function(array($handler, 'onShutdown'));
- set_exception_handler(array($handler, 'onException'));
+ register_shutdown_function([$handler, 'onShutdown']);
+ set_exception_handler([$handler, 'onException']);
}
public static function setLogger(ILogger $logger) {
@@ -65,7 +65,7 @@ class ErrorHandler {
if($error && self::$logger) {
//ob_end_clean();
$msg = $error['message'] . ' at ' . $error['file'] . '#' . $error['line'];
- self::$logger->critical(self::removePassword($msg), array('app' => 'PHP'));
+ self::$logger->critical(self::removePassword($msg), ['app' => 'PHP']);
}
}
@@ -87,14 +87,14 @@ class ErrorHandler {
return;
}
$msg = $message . ' at ' . $file . '#' . $line;
- self::$logger->error(self::removePassword($msg), array('app' => 'PHP'));
+ self::$logger->error(self::removePassword($msg), ['app' => 'PHP']);
}
//Recoverable handler which catch all errors, warnings and notices
public static function onAll($number, $message, $file, $line) {
$msg = $message . ' at ' . $file . '#' . $line;
- self::$logger->debug(self::removePassword($msg), array('app' => 'PHP'));
+ self::$logger->debug(self::removePassword($msg), ['app' => 'PHP']);
}
diff --git a/lib/private/Log/File.php b/lib/private/Log/File.php
index eb7eedac83e..80e0beeba0d 100644
--- a/lib/private/Log/File.php
+++ b/lib/private/Log/File.php
@@ -106,7 +106,7 @@ class File extends LogDetails implements IWriter, IFileBased {
*/
public function getEntries(int $limit=50, int $offset=0):array {
$minLevel = $this->config->getValue("loglevel", ILogger::WARN);
- $entries = array();
+ $entries = [];
$handle = @fopen($this->logFile, 'rb');
if ($handle) {
fseek($handle, 0, SEEK_END);