diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-22 20:52:10 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-22 20:52:10 +0100 |
commit | 68748d4f85dd23238aaafb787b1c341f0f2f0419 (patch) | |
tree | 7aab3a925dda8dcd6ef4e8c6fe04063abbadd6af /tests/lib/AppFramework/Middleware | |
parent | 21119633041d5ccae19975a58b0ae50ef5a8e33a (diff) | |
download | nextcloud-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 'tests/lib/AppFramework/Middleware')
9 files changed, 9 insertions, 13 deletions
diff --git a/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php b/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php index e6c2c1b4f53..e38aa4525e3 100644 --- a/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php +++ b/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php @@ -21,17 +21,15 @@ * */ - namespace Test\AppFramework\Middleware; use OC\AppFramework\Http\Request; use OC\AppFramework\Middleware\MiddlewareDispatcher; use OCP\AppFramework\Controller; -use OCP\AppFramework\Middleware; use OCP\AppFramework\Http\Response; +use OCP\AppFramework\Middleware; use OCP\IConfig; - // needed to test ordering class TestMiddleware extends Middleware { public static $beforeControllerCalled = 0; diff --git a/tests/lib/AppFramework/Middleware/MiddlewareTest.php b/tests/lib/AppFramework/Middleware/MiddlewareTest.php index 038bec25148..8f9c60b65ff 100644 --- a/tests/lib/AppFramework/Middleware/MiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/MiddlewareTest.php @@ -21,12 +21,11 @@ * */ - namespace Test\AppFramework\Middleware; use OC\AppFramework\Http\Request; -use OCP\AppFramework\Middleware; use OCP\AppFramework\Http\Response; +use OCP\AppFramework\Middleware; use OCP\IConfig; class ChildMiddleware extends Middleware {}; diff --git a/tests/lib/AppFramework/Middleware/OCSMiddlewareTest.php b/tests/lib/AppFramework/Middleware/OCSMiddlewareTest.php index 5b88872d905..cca3b4aecca 100644 --- a/tests/lib/AppFramework/Middleware/OCSMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/OCSMiddlewareTest.php @@ -19,8 +19,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\AppFramework\Middleware; +use OC\AppFramework\Middleware\OCSMiddleware; use OC\AppFramework\OCS\BaseResponse; use OC\AppFramework\OCS\V1Response; use OC\AppFramework\OCS\V2Response; @@ -32,8 +34,6 @@ use OCP\AppFramework\OCS\OCSForbiddenException; use OCP\AppFramework\OCS\OCSNotFoundException; use OCP\AppFramework\OCSController; use OCP\IRequest; -use OC\AppFramework\Middleware\OCSMiddleware; - class OCSMiddlewareTest extends \Test\TestCase { diff --git a/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php b/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php index de610100c2a..4ad90b6e874 100644 --- a/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\AppFramework\Middleware\PublicShare; use OC\AppFramework\Middleware\PublicShare\Exceptions\NeedAuthenticationException; @@ -35,7 +36,6 @@ use OCP\IRequest; use OCP\ISession; use OCP\IURLGenerator; - class PublicShareMiddlewareTest extends \Test\TestCase { /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */ diff --git a/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php index 498eaed8949..0fab8803073 100644 --- a/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php @@ -9,13 +9,12 @@ * @copyright Bernhard Posselt 2014 */ - namespace Test\AppFramework\Middleware\Security; use OC\AppFramework\Http\Request; use OC\AppFramework\Middleware\Security\CORSMiddleware; -use OC\AppFramework\Utility\ControllerMethodReflector; use OC\AppFramework\Middleware\Security\Exceptions\SecurityException; +use OC\AppFramework\Utility\ControllerMethodReflector; use OC\Security\Bruteforce\Throttler; use OC\User\Session; use OCP\AppFramework\Controller; diff --git a/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php index 95729e286f9..c981e840d70 100644 --- a/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\AppFramework\Middleware\Security; use OC\AppFramework\Middleware\Security\Exceptions\NotConfirmedException; diff --git a/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php index 7784f55e84a..c92c131780e 100644 --- a/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\AppFramework\Middleware\Security; use OC\AppFramework\Http\Request; diff --git a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php index 6a1adf03b2f..00bb1a0bb3c 100644 --- a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php @@ -40,8 +40,8 @@ use OC\Security\CSRF\CsrfTokenManager; use OCP\App\IAppManager; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\EmptyContentSecurityPolicy; -use OCP\AppFramework\Http\RedirectResponse; use OCP\AppFramework\Http\JSONResponse; +use OCP\AppFramework\Http\RedirectResponse; use OCP\AppFramework\Http\Response; use OCP\AppFramework\Http\TemplateResponse; use OCP\IConfig; diff --git a/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php b/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php index 813b0d54dc6..2cd61c73c71 100644 --- a/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php @@ -9,7 +9,6 @@ * @copyright Thomas Müller 2014 */ - namespace Test\AppFramework\Middleware; use OC\AppFramework\Http\Request; @@ -19,7 +18,6 @@ use OCP\AppFramework\Controller; use OCP\AppFramework\Http\Response; use OCP\IConfig; - class SessionMiddlewareTest extends \Test\TestCase { /** @var ControllerMethodReflector */ |