From c4998efcfc5c36780079cf662d68bd0444197e2e Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Wed, 8 Apr 2020 21:56:56 +0200 Subject: [PATCH] Migrate to PSR1 coding style Signed-off-by: Christoph Wurst --- core/Controller/WebAuthnController.php | 2 +- lib/private/Authentication/Login/LoggedInCheckCommand.php | 2 -- .../Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php | 1 - lib/private/Authentication/WebAuthn/Manager.php | 1 - lib/private/User/Session.php | 2 -- lib/private/legacy/OC_Helper.php | 1 - lib/public/User/Events/BeforeUserLoggedInEvent.php | 1 - tests/lib/Authentication/Login/LoggedInCheckCommandTest.php | 1 - 8 files changed, 1 insertion(+), 10 deletions(-) diff --git a/core/Controller/WebAuthnController.php b/core/Controller/WebAuthnController.php index 0b98a58c1e..4cbea8390d 100644 --- a/core/Controller/WebAuthnController.php +++ b/core/Controller/WebAuthnController.php @@ -75,7 +75,7 @@ class WebAuthnController extends Controller { Util::emitHook( '\OCA\Files_Sharing\API\Server2Server', 'preLoginNameUsedAsUserName', - array('uid' => &$uid) + ['uid' => &$uid] ); $this->logger->debug('Got UID: ' . $uid); diff --git a/lib/private/Authentication/Login/LoggedInCheckCommand.php b/lib/private/Authentication/Login/LoggedInCheckCommand.php index 78f27bfa93..5701f2970a 100644 --- a/lib/private/Authentication/Login/LoggedInCheckCommand.php +++ b/lib/private/Authentication/Login/LoggedInCheckCommand.php @@ -27,11 +27,9 @@ namespace OC\Authentication\Login; use OC\Authentication\Events\LoginFailed; use OC\Core\Controller\LoginController; -use OCP\Authentication\Events\LoginFailedEvent; use OCP\EventDispatcher\IEventDispatcher; use OCP\ILogger; use OCP\IUserManager; -use OCP\Util; class LoggedInCheckCommand extends ALoginCommand { diff --git a/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php b/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php index 3b0413aef0..cd5da83805 100644 --- a/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php +++ b/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php @@ -27,7 +27,6 @@ namespace OC\Authentication\WebAuthn\Db; use JsonSerializable; use OCP\AppFramework\Db\Entity; use Webauthn\PublicKeyCredentialSource; -use Webauthn\TrustPath\TrustPathLoader; /** * @since 19.0.0 diff --git a/lib/private/Authentication/WebAuthn/Manager.php b/lib/private/Authentication/WebAuthn/Manager.php index 32a90345b5..180eb1543b 100644 --- a/lib/private/Authentication/WebAuthn/Manager.php +++ b/lib/private/Authentication/WebAuthn/Manager.php @@ -49,7 +49,6 @@ use Webauthn\PublicKeyCredentialLoader; use Webauthn\PublicKeyCredentialParameters; use Webauthn\PublicKeyCredentialRequestOptions; use Webauthn\PublicKeyCredentialRpEntity; -use Webauthn\PublicKeyCredentialSource; use Webauthn\PublicKeyCredentialUserEntity; use Webauthn\TokenBinding\TokenBindingNotSupportedHandler; diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php index 9129fb7054..ca0c7263f7 100644 --- a/lib/private/User/Session.php +++ b/lib/private/User/Session.php @@ -51,7 +51,6 @@ use OC_User; use OC_Util; use OCA\DAV\Connector\Sabre\Auth; use OCP\AppFramework\Utility\ITimeFactory; -use OCP\Authentication\Events\LoginFailedEvent; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\NotPermittedException; use OCP\IConfig; @@ -59,7 +58,6 @@ use OCP\ILogger; use OCP\IRequest; use OCP\ISession; use OCP\IUser; -use OCP\IUserManager; use OCP\IUserSession; use OCP\Lockdown\ILockdownManager; use OCP\Security\ISecureRandom; diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php index 626295af5a..7cb6e228b5 100644 --- a/lib/private/legacy/OC_Helper.php +++ b/lib/private/legacy/OC_Helper.php @@ -44,7 +44,6 @@ * */ -use OCP\IUser; use Symfony\Component\Process\ExecutableFinder; /** diff --git a/lib/public/User/Events/BeforeUserLoggedInEvent.php b/lib/public/User/Events/BeforeUserLoggedInEvent.php index dca5c16518..3f64bf7ce3 100644 --- a/lib/public/User/Events/BeforeUserLoggedInEvent.php +++ b/lib/public/User/Events/BeforeUserLoggedInEvent.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCP\User\Events; use OCP\EventDispatcher\Event; -use OCP\IUser; /** * @since 18.0.0 diff --git a/tests/lib/Authentication/Login/LoggedInCheckCommandTest.php b/tests/lib/Authentication/Login/LoggedInCheckCommandTest.php index f051147609..7b47bbf513 100644 --- a/tests/lib/Authentication/Login/LoggedInCheckCommandTest.php +++ b/tests/lib/Authentication/Login/LoggedInCheckCommandTest.php @@ -25,7 +25,6 @@ declare(strict_types=1); namespace lib\Authentication\Login; -use Hoa\Iterator\Mock; use OC\Authentication\Login\LoggedInCheckCommand; use OC\Core\Controller\LoginController; use OCP\EventDispatcher\IEventDispatcher;