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;
/**
* Authentication mechanism
* - StorageModifierTrait
* Object can affect storage mounting
*/
-class AuthMechanism implements \JsonSerializable, IIdentifier, IFrontendDefintion {
+class AuthMechanism implements \JsonSerializable, IIdentifier, IFrontendDefinition {
/** Standard authentication schemes */
public const SCHEME_NULL = 'null';
public const SCHEME_BUILTIN = 'builtin';
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
* - StorageModifierTrait
* Object can affect storage mounting
*/
-class Backend implements \JsonSerializable, IIdentifier, IFrontendDefintion {
+class Backend implements \JsonSerializable, IIdentifier, IFrontendDefinition {
use VisibilityTrait;
use FrontendDefinitionTrait;
use PriorityTrait;
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;
}
/**
/** @var string human-readable mechanism name */
private string $text = "";
- /** @var DefinitionParameter[] parameters for mechanism */
+ /** @var array<string, DefinitionParameter> parameters for mechanism */
private array $parameters = [];
/** @var string[] custom JS */
}
/**
- * @return DefinitionParameter[]
+ * @return array<string, DefinitionParameter>
*/
public function getParameters(): array {
return $this->parameters;
}
/**
- * @param DefinitionParameter[] $parameters
+ * @param list<DefinitionParameter> $parameters
*/
public function addParameters(array $parameters): self {
foreach ($parameters as $parameter) {
*/
namespace OCA\Files_External\Lib;
-interface IFrontendDefintion {
+interface IFrontendDefinition {
public function getText(): string;
public function setText(string $text): self;
/**
- * @return list<DefinitionParameter>
+ * @return array<string, DefinitionParameter>
*/
public function getParameters(): array;
/**
- * @param DefinitionParameter[] $parameters
+ * @param list<DefinitionParameter> $parameters
*/
public function addParameters(array $parameters): self;
$this->dependency = $dependency;
}
- /**
- * @return string
- */
- public function getDependency() {
+ public function getDependency(): string {
return $this->dependency;
}
- /**
- * @return string|null
- */
- public function getMessage() {
+ public function getMessage(): ?string {
return $this->message;
}