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_sharing/lib/Middleware/SharingCheckMiddleware.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/files_sharing/lib/Middleware') diff --git a/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php b/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php index c96b559daf5..4b630d0a8da 100644 --- a/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php +++ b/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php @@ -121,11 +121,11 @@ class SharingCheckMiddleware extends Middleware { * @throws \Exception */ public function afterException($controller, $methodName, \Exception $exception) { - if(is_a($exception, '\OCP\Files\NotFoundException')) { + if(is_a($exception, NotFoundException::class)) { return new NotFoundResponse(); } - if (is_a($exception, '\OCA\Files_Sharing\Exceptions\S2SException')) { + if (is_a($exception, S2SException::class)) { return new JSONResponse($exception->getMessage(), 405); } -- cgit v1.2.3