summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-01-29 15:25:08 +0100
committerGitHub <noreply@github.com>2018-01-29 15:25:08 +0100
commit01482b32a171bb8529bc8baacbe764107e52e14c (patch)
treec129fb9971d57a0685b84bd97d4235f84231eb19 /apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php
parent6d86dcb2654739bac62948c94a076c101b1e637d (diff)
parenteb51f06a3b9e42686f462b9f7a56411d3fe6cb27 (diff)
downloadnextcloud-server-01482b32a171bb8529bc8baacbe764107e52e14c.tar.gz
nextcloud-server-01482b32a171bb8529bc8baacbe764107e52e14c.zip
Merge pull request #8062 from nextcloud/use-class
Use ::class statement instead of string
Diffstat (limited to 'apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php')
-rw-r--r--apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php4
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);
}