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:
authorLukas Reschke <lukas@statuscode.ch>2017-08-01 18:32:03 +0300
committerLukas Reschke <lukas@statuscode.ch>2017-08-01 18:32:03 +0300
commitf93a82b8b09109e391b0314f92d02d285c356ad6 (patch)
treec85246eadd2103200e26af6b208756dc87822e76 /apps/files_sharing/lib/Middleware
parent84c22fdeef6986f9038d8563937cc234751d5147 (diff)
Remove explicit type hints for Controller
This is public API and breaks the middlewares of existing apps. Since this also requires maintaining two different code paths for 12 and 13 I'm at the moment voting for reverting this change. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'apps/files_sharing/lib/Middleware')
-rw-r--r--apps/files_sharing/lib/Middleware/OCSShareAPIMiddleware.php4
-rw-r--r--apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php4
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/files_sharing/lib/Middleware/OCSShareAPIMiddleware.php b/apps/files_sharing/lib/Middleware/OCSShareAPIMiddleware.php
index dd337012507..9df0229ab8c 100644
--- a/apps/files_sharing/lib/Middleware/OCSShareAPIMiddleware.php
+++ b/apps/files_sharing/lib/Middleware/OCSShareAPIMiddleware.php
@@ -28,7 +28,7 @@ class OCSShareAPIMiddleware extends Middleware {
*
* @throws OCSNotFoundException
*/
- public function beforeController(Controller $controller, $methodName) {
+ public function beforeController($controller, $methodName) {
if ($controller instanceof ShareAPIController) {
if (!$this->shareManager->shareApiEnabled()) {
throw new OCSNotFoundException($this->l->t('Share API is disabled'));
@@ -42,7 +42,7 @@ class OCSShareAPIMiddleware 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 ShareAPIController) {
/** @var ShareAPIController $controller */
$controller->cleanup();
diff --git a/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php b/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php
index 3dd4ad718bb..e1a77fdec30 100644
--- a/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php
+++ b/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php
@@ -92,7 +92,7 @@ class SharingCheckMiddleware extends Middleware {
* @throws S2SException
* @throws ShareNotFound
*/
- public function beforeController(Controller $controller, $methodName) {
+ public function beforeController($controller, $methodName) {
if(!$this->isSharingEnabled()) {
throw new NotFoundException('Sharing is disabled.');
}
@@ -119,7 +119,7 @@ class SharingCheckMiddleware extends Middleware {
* @return NotFoundResponse
* @throws \Exception
*/
- public function afterException(Controller $controller, $methodName, \Exception $exception) {
+ public function afterException($controller, $methodName, \Exception $exception) {
if(is_a($exception, '\OCP\Files\NotFoundException')) {
return new NotFoundResponse();
}