summaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-11-22 20:52:10 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-11-22 20:52:10 +0100
commit68748d4f85dd23238aaafb787b1c341f0f2f0419 (patch)
tree7aab3a925dda8dcd6ef4e8c6fe04063abbadd6af /lib/private/AppFramework
parent21119633041d5ccae19975a58b0ae50ef5a8e33a (diff)
downloadnextcloud-server-68748d4f85dd23238aaafb787b1c341f0f2f0419.tar.gz
nextcloud-server-68748d4f85dd23238aaafb787b1c341f0f2f0419.zip
Some php-cs fixes
* Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/AppFramework')
-rw-r--r--lib/private/AppFramework/App.php5
-rw-r--r--lib/private/AppFramework/DependencyInjection/DIContainer.php5
-rw-r--r--lib/private/AppFramework/Http.php3
-rw-r--r--lib/private/AppFramework/Http/Dispatcher.php10
-rw-r--r--lib/private/AppFramework/Middleware/MiddlewareDispatcher.php1
-rw-r--r--lib/private/AppFramework/Middleware/OCSMiddleware.php3
-rw-r--r--lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php1
-rw-r--r--lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php1
-rw-r--r--lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php13
-rw-r--r--lib/private/AppFramework/Middleware/SessionMiddleware.php2
-rw-r--r--lib/private/AppFramework/OCS/BaseResponse.php1
-rw-r--r--lib/private/AppFramework/OCS/V1Response.php1
-rw-r--r--lib/private/AppFramework/OCS/V2Response.php3
-rw-r--r--lib/private/AppFramework/Routing/RouteActionHandler.php4
-rw-r--r--lib/private/AppFramework/Utility/ControllerMethodReflector.php2
-rw-r--r--lib/private/AppFramework/Utility/SimpleContainer.php6
-rw-r--r--lib/private/AppFramework/Utility/TimeFactory.php1
17 files changed, 29 insertions, 33 deletions
diff --git a/lib/private/AppFramework/App.php b/lib/private/AppFramework/App.php
index 691c5514881..122f4684558 100644
--- a/lib/private/AppFramework/App.php
+++ b/lib/private/AppFramework/App.php
@@ -26,16 +26,15 @@ declare(strict_types=1);
*
*/
-
namespace OC\AppFramework;
-use OC\AppFramework\Http\Dispatcher;
use OC\AppFramework\DependencyInjection\DIContainer;
+use OC\AppFramework\Http\Dispatcher;
use OC\HintException;
use OCP\AppFramework\Http;
-use OCP\AppFramework\QueryException;
use OCP\AppFramework\Http\ICallbackResponse;
use OCP\AppFramework\Http\IOutput;
+use OCP\AppFramework\QueryException;
use OCP\IRequest;
/**
diff --git a/lib/private/AppFramework/DependencyInjection/DIContainer.php b/lib/private/AppFramework/DependencyInjection/DIContainer.php
index 5f3fa1b6dc6..b41be947adb 100644
--- a/lib/private/AppFramework/DependencyInjection/DIContainer.php
+++ b/lib/private/AppFramework/DependencyInjection/DIContainer.php
@@ -32,7 +32,6 @@
*
*/
-
namespace OC\AppFramework\DependencyInjection;
use OC;
@@ -40,14 +39,15 @@ use OC\AppFramework\Http;
use OC\AppFramework\Http\Dispatcher;
use OC\AppFramework\Http\Output;
use OC\AppFramework\Middleware\MiddlewareDispatcher;
-use OC\AppFramework\Middleware\Security\CORSMiddleware;
use OC\AppFramework\Middleware\OCSMiddleware;
+use OC\AppFramework\Middleware\Security\CORSMiddleware;
use OC\AppFramework\Middleware\Security\RateLimitingMiddleware;
use OC\AppFramework\Middleware\Security\SecurityMiddleware;
use OC\AppFramework\Middleware\SessionMiddleware;
use OC\AppFramework\Utility\SimpleContainer;
use OC\Core\Middleware\TwoFactorMiddleware;
use OC\ServerContainer;
+use OCA\WorkflowEngine\Manager;
use OCP\AppFramework\Http\IOutput;
use OCP\AppFramework\IAppContainer;
use OCP\AppFramework\QueryException;
@@ -65,7 +65,6 @@ use OCP\IServerContainer;
use OCP\ISession;
use OCP\IURLGenerator;
use OCP\IUserSession;
-use OCA\WorkflowEngine\Manager;
class DIContainer extends SimpleContainer implements IAppContainer {
diff --git a/lib/private/AppFramework/Http.php b/lib/private/AppFramework/Http.php
index e126c8a1cf0..0b3b31fe541 100644
--- a/lib/private/AppFramework/Http.php
+++ b/lib/private/AppFramework/Http.php
@@ -27,7 +27,6 @@
*
*/
-
namespace OC\AppFramework;
use OCP\AppFramework\Http as BaseHttp;
@@ -152,5 +151,3 @@ class Http extends BaseHttp {
}
-
-
diff --git a/lib/private/AppFramework/Http/Dispatcher.php b/lib/private/AppFramework/Http/Dispatcher.php
index 0b9422f9fc9..6a04de76adc 100644
--- a/lib/private/AppFramework/Http/Dispatcher.php
+++ b/lib/private/AppFramework/Http/Dispatcher.php
@@ -27,19 +27,17 @@ declare(strict_types=1);
*
*/
-
namespace OC\AppFramework\Http;
-use \OC\AppFramework\Middleware\MiddlewareDispatcher;
-use \OC\AppFramework\Http;
-use \OC\AppFramework\Utility\ControllerMethodReflector;
+use OC\AppFramework\Http;
+use OC\AppFramework\Middleware\MiddlewareDispatcher;
+use OC\AppFramework\Utility\ControllerMethodReflector;
use OCP\AppFramework\Controller;
-use OCP\AppFramework\Http\Response;
use OCP\AppFramework\Http\DataResponse;
+use OCP\AppFramework\Http\Response;
use OCP\IRequest;
-
/**
* Class to dispatch the request to the middleware dispatcher
*/
diff --git a/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php b/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php
index e1262b6c712..70440e9623f 100644
--- a/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php
+++ b/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php
@@ -26,7 +26,6 @@ declare(strict_types=1);
*
*/
-
namespace OC\AppFramework\Middleware;
use OCP\AppFramework\Controller;
diff --git a/lib/private/AppFramework/Middleware/OCSMiddleware.php b/lib/private/AppFramework/Middleware/OCSMiddleware.php
index ad1d953f372..2174693a1d7 100644
--- a/lib/private/AppFramework/Middleware/OCSMiddleware.php
+++ b/lib/private/AppFramework/Middleware/OCSMiddleware.php
@@ -21,6 +21,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
+
namespace OC\AppFramework\Middleware;
use OC\AppFramework\Http;
@@ -32,10 +33,10 @@ use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\Http\Response;
+use OCP\AppFramework\Middleware;
use OCP\AppFramework\OCS\OCSException;
use OCP\AppFramework\OCSController;
use OCP\IRequest;
-use OCP\AppFramework\Middleware;
class OCSMiddleware extends Middleware {
diff --git a/lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php b/lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php
index d752a68cf32..9f005448387 100644
--- a/lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php
@@ -20,6 +20,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
+
namespace OC\AppFramework\Middleware\Security;
use OC\AppFramework\Middleware\Security\Exceptions\NotConfirmedException;
diff --git a/lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php b/lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php
index 22a9246d661..3c011945477 100644
--- a/lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php
@@ -20,6 +20,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
+
namespace OC\AppFramework\Middleware\Security;
use OC\AppFramework\Http\Request;
diff --git a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php
index db3157bda64..16725b1f5d6 100644
--- a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php
@@ -28,31 +28,30 @@ declare(strict_types=1);
*
*/
-
namespace OC\AppFramework\Middleware\Security;
use OC\AppFramework\Middleware\Security\Exceptions\AppNotEnabledException;
use OC\AppFramework\Middleware\Security\Exceptions\CrossSiteRequestForgeryException;
use OC\AppFramework\Middleware\Security\Exceptions\NotAdminException;
use OC\AppFramework\Middleware\Security\Exceptions\NotLoggedInException;
+use OC\AppFramework\Middleware\Security\Exceptions\SecurityException;
use OC\AppFramework\Middleware\Security\Exceptions\StrictCookieMissingException;
use OC\AppFramework\Utility\ControllerMethodReflector;
use OCP\App\AppPathNotFoundException;
use OCP\App\IAppManager;
+use OCP\AppFramework\Controller;
+use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\Http\RedirectResponse;
+use OCP\AppFramework\Http\Response;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Middleware;
-use OCP\AppFramework\Http\Response;
-use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\OCSController;
use OCP\IL10N;
+use OCP\ILogger;
use OCP\INavigationManager;
-use OCP\IURLGenerator;
use OCP\IRequest;
-use OCP\ILogger;
-use OCP\AppFramework\Controller;
+use OCP\IURLGenerator;
use OCP\Util;
-use OC\AppFramework\Middleware\Security\Exceptions\SecurityException;
/**
* Used to do all the authentication and checking stuff for a controller method
diff --git a/lib/private/AppFramework/Middleware/SessionMiddleware.php b/lib/private/AppFramework/Middleware/SessionMiddleware.php
index 3cb60874b38..cc927e6875c 100644
--- a/lib/private/AppFramework/Middleware/SessionMiddleware.php
+++ b/lib/private/AppFramework/Middleware/SessionMiddleware.php
@@ -27,9 +27,9 @@ namespace OC\AppFramework\Middleware;
use OC\AppFramework\Utility\ControllerMethodReflector;
use OCP\AppFramework\Controller;
-use OCP\IRequest;
use OCP\AppFramework\Http\Response;
use OCP\AppFramework\Middleware;
+use OCP\IRequest;
use OCP\ISession;
class SessionMiddleware extends Middleware {
diff --git a/lib/private/AppFramework/OCS/BaseResponse.php b/lib/private/AppFramework/OCS/BaseResponse.php
index 90ea084dd99..19567f8fdaf 100644
--- a/lib/private/AppFramework/OCS/BaseResponse.php
+++ b/lib/private/AppFramework/OCS/BaseResponse.php
@@ -20,6 +20,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
+
namespace OC\AppFramework\OCS;
use OCP\AppFramework\Http;
diff --git a/lib/private/AppFramework/OCS/V1Response.php b/lib/private/AppFramework/OCS/V1Response.php
index 08b11788110..02405b5edbe 100644
--- a/lib/private/AppFramework/OCS/V1Response.php
+++ b/lib/private/AppFramework/OCS/V1Response.php
@@ -20,6 +20,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
+
namespace OC\AppFramework\OCS;
use OCP\API;
diff --git a/lib/private/AppFramework/OCS/V2Response.php b/lib/private/AppFramework/OCS/V2Response.php
index 7e98efe867d..54e9e8bd9a7 100644
--- a/lib/private/AppFramework/OCS/V2Response.php
+++ b/lib/private/AppFramework/OCS/V2Response.php
@@ -20,10 +20,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
+
namespace OC\AppFramework\OCS;
-use OCP\AppFramework\Http;
use OCP\API;
+use OCP\AppFramework\Http;
class V2Response extends BaseResponse {
diff --git a/lib/private/AppFramework/Routing/RouteActionHandler.php b/lib/private/AppFramework/Routing/RouteActionHandler.php
index bcbe2eb400b..7e1c089d2a8 100644
--- a/lib/private/AppFramework/Routing/RouteActionHandler.php
+++ b/lib/private/AppFramework/Routing/RouteActionHandler.php
@@ -25,8 +25,8 @@
namespace OC\AppFramework\Routing;
-use \OC\AppFramework\App;
-use \OC\AppFramework\DependencyInjection\DIContainer;
+use OC\AppFramework\App;
+use OC\AppFramework\DependencyInjection\DIContainer;
class RouteActionHandler {
private $controllerName;
diff --git a/lib/private/AppFramework/Utility/ControllerMethodReflector.php b/lib/private/AppFramework/Utility/ControllerMethodReflector.php
index fd42606cf54..187fb43a9fc 100644
--- a/lib/private/AppFramework/Utility/ControllerMethodReflector.php
+++ b/lib/private/AppFramework/Utility/ControllerMethodReflector.php
@@ -29,7 +29,7 @@ declare(strict_types=1);
namespace OC\AppFramework\Utility;
-use \OCP\AppFramework\Utility\IControllerMethodReflector;
+use OCP\AppFramework\Utility\IControllerMethodReflector;
/**
* Reads and parses annotations from doc comments
diff --git a/lib/private/AppFramework/Utility/SimpleContainer.php b/lib/private/AppFramework/Utility/SimpleContainer.php
index 6f50523bbf6..b8398623490 100644
--- a/lib/private/AppFramework/Utility/SimpleContainer.php
+++ b/lib/private/AppFramework/Utility/SimpleContainer.php
@@ -28,12 +28,12 @@
namespace OC\AppFramework\Utility;
-use ReflectionClass;
-use ReflectionException;
use Closure;
-use Pimple\Container;
use OCP\AppFramework\QueryException;
use OCP\IContainer;
+use Pimple\Container;
+use ReflectionClass;
+use ReflectionException;
/**
* Class SimpleContainer
diff --git a/lib/private/AppFramework/Utility/TimeFactory.php b/lib/private/AppFramework/Utility/TimeFactory.php
index 4526f9b1abb..841d1838354 100644
--- a/lib/private/AppFramework/Utility/TimeFactory.php
+++ b/lib/private/AppFramework/Utility/TimeFactory.php
@@ -27,7 +27,6 @@ namespace OC\AppFramework\Utility;
use OCP\AppFramework\Utility\ITimeFactory;
-
/**
* Needed to mock calls to time()
*/