diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-01-26 01:16:13 +0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-01-29 14:03:47 +0300 |
commit | eb51f06a3b9e42686f462b9f7a56411d3fe6cb27 (patch) | |
tree | 0d96c86c4489b4e3fe60bcceaeb6759d856a36e9 /apps/files_sharing/lib/Middleware | |
parent | 1d8b90b8d3c8a85104d223b7f1d5693280370774 (diff) |
Use ::class statement instead of string
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/files_sharing/lib/Middleware')
-rw-r--r-- | apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php | 4 |
1 files changed, 2 insertions, 2 deletions
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); } |