From 9319bbb00ce98bbb6da8f8772199356872f1873b Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Mon, 17 Oct 2022 11:50:32 +0200 Subject: More type safety Signed-off-by: Carl Schwan --- apps/files_external/lib/Lib/Backend/Backend.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'apps/files_external/lib/Lib/Backend') diff --git a/apps/files_external/lib/Lib/Backend/Backend.php b/apps/files_external/lib/Lib/Backend/Backend.php index afedfd213eb..845f51f5432 100644 --- a/apps/files_external/lib/Lib/Backend/Backend.php +++ b/apps/files_external/lib/Lib/Backend/Backend.php @@ -31,7 +31,7 @@ use OCA\Files_External\Lib\StorageConfig; use OCA\Files_External\Lib\StorageModifierTrait; use OCA\Files_External\Lib\VisibilityTrait; use OCA\Files_External\Lib\IIdentifier; -use OCA\Files_External\Lib\IFrontendDefintion; +use OCA\Files_External\Lib\IFrontendDefinition; /** * Storage backend @@ -57,7 +57,7 @@ use OCA\Files_External\Lib\IFrontendDefintion; * - StorageModifierTrait * Object can affect storage mounting */ -class Backend implements \JsonSerializable, IIdentifier, IFrontendDefintion { +class Backend implements \JsonSerializable, IIdentifier, IFrontendDefinition { use VisibilityTrait; use FrontendDefinitionTrait; use PriorityTrait; @@ -120,21 +120,17 @@ class Backend implements \JsonSerializable, IIdentifier, IFrontendDefintion { return $this->legacyAuthMechanism; } - /** - * @param AuthMechanism $authMechanism - * @return self - */ - public function setLegacyAuthMechanism(AuthMechanism $authMechanism) { + public function setLegacyAuthMechanism(AuthMechanism $authMechanism): self { $this->legacyAuthMechanism = $authMechanism; return $this; } /** * @param callable $callback dynamic auth mechanism selection - * @return self */ - public function setLegacyAuthMechanismCallback(callable $callback) { + public function setLegacyAuthMechanismCallback(callable $callback): self { $this->legacyAuthMechanism = $callback; + return $this; } /** -- cgit v1.2.3