diff --git a/lib/controller/accountscontroller.php b/lib/controller/accountscontroller.php index e86ef061..ba5dea2f 100644 --- a/lib/controller/accountscontroller.php +++ b/lib/controller/accountscontroller.php @@ -45,7 +45,6 @@ use OCP\Files\File; use OCP\Files\Folder; use OCP\IL10N; -use OCP\ILogger; use OCP\IRequest; use OCP\Security\ICrypto; @@ -63,7 +62,7 @@ class AccountsController extends Controller { /** @var Folder */ private $userFolder; - /** @var ILogger */ + /** @var Logger */ private $logger; /** @var IL10N */ @@ -233,7 +232,7 @@ public function create($accountName, $emailAddress, $password, ['data' => ['id' => $newAccount->getId()]], Http::STATUS_CREATED); } - } catch (\Exception $ex) { + } catch (Exception $ex) { $this->logger->error('Creating account failed: ' . $ex->getMessage()); return new JSONResponse( array('message' => $this->l10n->t('Creating account failed: ') . $ex->getMessage()), diff --git a/lib/service/logger.php b/lib/service/logger.php index 3bbfafbb..a9d37d2a 100644 --- a/lib/service/logger.php +++ b/lib/service/logger.php @@ -24,7 +24,7 @@ use OCP\ILogger; -class Logger implements ILogger { +class Logger { /** @var array */ private $context; @@ -103,14 +103,14 @@ public function debug($message, array $context = []) { /** * @inheritdoc */ - public function log($level, $message, array $context = array()) { + public function log($level, $message, array $context = []) { $this->logger->log($level, $message, array_merge($this->context, $context)); } /** * @inheritdoc */ - public function logException(\Exception $exception, array $context = array()) { + public function logException($exception, array $context = []) { $this->logger->logException($exception, array_merge($this->context, $context)); }