Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-08-10 17:25:58 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2017-08-10 17:25:58 +0300
commit685f27221289a2b33918048b62427a44573511bb (patch)
tree4185c28e622a3992222e60a9e0b68c00156d14da /apps/files_sharing/lib/Middleware
parentc9d2e31d527190660c51a75741747178f029091c (diff)
Add unit tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_sharing/lib/Middleware')
-rw-r--r--apps/files_sharing/lib/Middleware/ShareInfoMiddleware.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/files_sharing/lib/Middleware/ShareInfoMiddleware.php b/apps/files_sharing/lib/Middleware/ShareInfoMiddleware.php
index a069ecacc2a..56e9b48f570 100644
--- a/apps/files_sharing/lib/Middleware/ShareInfoMiddleware.php
+++ b/apps/files_sharing/lib/Middleware/ShareInfoMiddleware.php
@@ -25,7 +25,7 @@ class ShareInfoMiddleware extends Middleware {
* @param string $methodName
* @throws S2SException
*/
- public function beforeController(Controller $controller, $methodName) {
+ public function beforeController($controller, $methodName) {
if (!($controller instanceof ShareInfoController)) {
return;
}
@@ -42,7 +42,7 @@ class ShareInfoMiddleware extends Middleware {
* @throws \Exception
* @return Response
*/
- public function afterException(Controller $controller, $methodName, \Exception $exception) {
+ public function afterException($controller, $methodName, \Exception $exception) {
if (!($controller instanceof ShareInfoController)) {
throw $exception;
}
@@ -50,6 +50,8 @@ class ShareInfoMiddleware extends Middleware {
if ($exception instanceof S2SException) {
return new JSONResponse([], Http::STATUS_NOT_FOUND);
}
+
+ throw $exception;
}
/**
@@ -58,7 +60,7 @@ class ShareInfoMiddleware extends Middleware {
* @param Response $response
* @return Response
*/
- public function afterController(Controller $controller, $methodName, Response $response) {
+ public function afterController($controller, $methodName, Response $response) {
if (!($controller instanceof ShareInfoController)) {
return $response;
}