From eb51f06a3b9e42686f462b9f7a56411d3fe6cb27 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Thu, 25 Jan 2018 23:16:13 +0100 Subject: Use ::class statement instead of string Signed-off-by: Morris Jobke --- apps/files/ajax/list.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'apps/files/ajax') diff --git a/apps/files/ajax/list.php b/apps/files/ajax/list.php index d91db8744c4..617ad18ac14 100644 --- a/apps/files/ajax/list.php +++ b/apps/files/ajax/list.php @@ -23,6 +23,10 @@ * along with this program. If not, see * */ + +use OCP\Files\StorageNotAvailableException; +use OCP\Files\StorageInvalidException; + OCP\JSON::checkLoggedIn(); \OC::$server->getSession()->close(); $l = \OC::$server->getL10N('files'); @@ -80,7 +84,7 @@ try { \OCP\Util::logException('files', $e); OCP\JSON::error([ 'data' => [ - 'exception' => '\OCP\Files\StorageNotAvailableException', + 'exception' => StorageNotAvailableException::class, 'message' => $l->t('Storage is temporarily not available') ] ]); @@ -88,7 +92,7 @@ try { \OCP\Util::logException('files', $e); OCP\JSON::error(array( 'data' => array( - 'exception' => '\OCP\Files\StorageInvalidException', + 'exception' => StorageInvalidException::class, 'message' => $l->t('Storage invalid') ) )); @@ -96,7 +100,7 @@ try { \OCP\Util::logException('files', $e); OCP\JSON::error(array( 'data' => array( - 'exception' => '\Exception', + 'exception' => \Exception::class, 'message' => $l->t('Unknown error') ) )); -- cgit v1.2.3