@@ -35,25 +35,25 @@ |
||
| 35 | 35 | use OCP\Migration\SimpleMigrationStep; |
| 36 | 36 | |
| 37 | 37 | class Version16000Date20190428150708 extends SimpleMigrationStep { |
| 38 | - /** |
|
| 39 | - * @param IOutput $output |
|
| 40 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
| 41 | - * @param array $options |
|
| 42 | - * @return null|ISchemaWrapper |
|
| 43 | - * @throws \Doctrine\DBAL\Schema\SchemaException |
|
| 44 | - */ |
|
| 45 | - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { |
|
| 46 | - /** @var ISchemaWrapper $schema */ |
|
| 47 | - $schema = $schemaClosure(); |
|
| 38 | + /** |
|
| 39 | + * @param IOutput $output |
|
| 40 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
| 41 | + * @param array $options |
|
| 42 | + * @return null|ISchemaWrapper |
|
| 43 | + * @throws \Doctrine\DBAL\Schema\SchemaException |
|
| 44 | + */ |
|
| 45 | + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { |
|
| 46 | + /** @var ISchemaWrapper $schema */ |
|
| 47 | + $schema = $schemaClosure(); |
|
| 48 | 48 | |
| 49 | - if ($schema->hasTable('collres_accesscache')) { |
|
| 50 | - $table = $schema->getTable('collres_accesscache'); |
|
| 51 | - $table->addColumn('access', Types::BOOLEAN, [ |
|
| 52 | - 'notnull' => false, |
|
| 53 | - 'default' => false |
|
| 54 | - ]); |
|
| 55 | - } |
|
| 49 | + if ($schema->hasTable('collres_accesscache')) { |
|
| 50 | + $table = $schema->getTable('collres_accesscache'); |
|
| 51 | + $table->addColumn('access', Types::BOOLEAN, [ |
|
| 52 | + 'notnull' => false, |
|
| 53 | + 'default' => false |
|
| 54 | + ]); |
|
| 55 | + } |
|
| 56 | 56 | |
| 57 | - return $schema; |
|
| 58 | - } |
|
| 57 | + return $schema; |
|
| 58 | + } |
|
| 59 | 59 | } |
@@ -31,21 +31,21 @@ |
||
| 31 | 31 | use OCP\Migration\SimpleMigrationStep; |
| 32 | 32 | |
| 33 | 33 | class Version20000Date20201109081919 extends SimpleMigrationStep { |
| 34 | - /** |
|
| 35 | - * @param IOutput $output |
|
| 36 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
| 37 | - * @param array $options |
|
| 38 | - * @return null|ISchemaWrapper |
|
| 39 | - */ |
|
| 40 | - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { |
|
| 41 | - /** @var ISchemaWrapper $schema */ |
|
| 42 | - $schema = $schemaClosure(); |
|
| 34 | + /** |
|
| 35 | + * @param IOutput $output |
|
| 36 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
| 37 | + * @param array $options |
|
| 38 | + * @return null|ISchemaWrapper |
|
| 39 | + */ |
|
| 40 | + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { |
|
| 41 | + /** @var ISchemaWrapper $schema */ |
|
| 42 | + $schema = $schemaClosure(); |
|
| 43 | 43 | |
| 44 | - if ($schema->hasTable('credentials')) { |
|
| 45 | - $schema->dropTable('credentials'); |
|
| 46 | - return $schema; |
|
| 47 | - } |
|
| 44 | + if ($schema->hasTable('credentials')) { |
|
| 45 | + $schema->dropTable('credentials'); |
|
| 46 | + return $schema; |
|
| 47 | + } |
|
| 48 | 48 | |
| 49 | - return null; |
|
| 50 | - } |
|
| 49 | + return null; |
|
| 50 | + } |
|
| 51 | 51 | } |
@@ -27,28 +27,28 @@ |
||
| 27 | 27 | use OCP\Migration\SimpleMigrationStep; |
| 28 | 28 | |
| 29 | 29 | class Version14000Date20180516101403 extends SimpleMigrationStep { |
| 30 | - /** |
|
| 31 | - * @param IOutput $output |
|
| 32 | - * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
| 33 | - * @param array $options |
|
| 34 | - * @return null|ISchemaWrapper |
|
| 35 | - */ |
|
| 36 | - public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
| 37 | - /** @var ISchemaWrapper $schema */ |
|
| 38 | - $schema = $schemaClosure(); |
|
| 30 | + /** |
|
| 31 | + * @param IOutput $output |
|
| 32 | + * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
| 33 | + * @param array $options |
|
| 34 | + * @return null|ISchemaWrapper |
|
| 35 | + */ |
|
| 36 | + public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
| 37 | + /** @var ISchemaWrapper $schema */ |
|
| 38 | + $schema = $schemaClosure(); |
|
| 39 | 39 | |
| 40 | - $table = $schema->getTable('authtoken'); |
|
| 40 | + $table = $schema->getTable('authtoken'); |
|
| 41 | 41 | |
| 42 | - if (!$table->hasColumn('expires')) { |
|
| 43 | - $table->addColumn('expires', 'integer', [ |
|
| 44 | - 'notnull' => false, |
|
| 45 | - 'length' => 4, |
|
| 46 | - 'default' => null, |
|
| 47 | - 'unsigned' => true, |
|
| 48 | - ]); |
|
| 42 | + if (!$table->hasColumn('expires')) { |
|
| 43 | + $table->addColumn('expires', 'integer', [ |
|
| 44 | + 'notnull' => false, |
|
| 45 | + 'length' => 4, |
|
| 46 | + 'default' => null, |
|
| 47 | + 'unsigned' => true, |
|
| 48 | + ]); |
|
| 49 | 49 | |
| 50 | - return $schema; |
|
| 51 | - } |
|
| 52 | - return null; |
|
| 53 | - } |
|
| 50 | + return $schema; |
|
| 51 | + } |
|
| 52 | + return null; |
|
| 53 | + } |
|
| 54 | 54 | } |
@@ -32,22 +32,22 @@ |
||
| 32 | 32 | use OCP\Migration\SimpleMigrationStep; |
| 33 | 33 | |
| 34 | 34 | class Version15000Date20181029084625 extends SimpleMigrationStep { |
| 35 | - /** |
|
| 36 | - * @param IOutput $output |
|
| 37 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
| 38 | - * @param array $options |
|
| 39 | - * @return null|ISchemaWrapper |
|
| 40 | - */ |
|
| 41 | - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { |
|
| 42 | - /** @var ISchemaWrapper $schema */ |
|
| 43 | - $schema = $schemaClosure(); |
|
| 35 | + /** |
|
| 36 | + * @param IOutput $output |
|
| 37 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
| 38 | + * @param array $options |
|
| 39 | + * @return null|ISchemaWrapper |
|
| 40 | + */ |
|
| 41 | + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { |
|
| 42 | + /** @var ISchemaWrapper $schema */ |
|
| 43 | + $schema = $schemaClosure(); |
|
| 44 | 44 | |
| 45 | - $table = $schema->getTable('share'); |
|
| 46 | - $table->addColumn('label', 'string', [ |
|
| 47 | - 'notnull' => false, |
|
| 48 | - 'length' => 255, |
|
| 49 | - ]); |
|
| 45 | + $table = $schema->getTable('share'); |
|
| 46 | + $table->addColumn('label', 'string', [ |
|
| 47 | + 'notnull' => false, |
|
| 48 | + 'length' => 255, |
|
| 49 | + ]); |
|
| 50 | 50 | |
| 51 | - return $schema; |
|
| 52 | - } |
|
| 51 | + return $schema; |
|
| 52 | + } |
|
| 53 | 53 | } |
@@ -32,23 +32,23 @@ |
||
| 32 | 32 | use OCP\Migration\SimpleMigrationStep; |
| 33 | 33 | |
| 34 | 34 | class Version15000Date20181015062942 extends SimpleMigrationStep { |
| 35 | - /** |
|
| 36 | - * @param IOutput $output |
|
| 37 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
| 38 | - * @param array $options |
|
| 39 | - * @return null|ISchemaWrapper |
|
| 40 | - */ |
|
| 41 | - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { |
|
| 42 | - /** @var ISchemaWrapper $schema */ |
|
| 43 | - $schema = $schemaClosure(); |
|
| 35 | + /** |
|
| 36 | + * @param IOutput $output |
|
| 37 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
| 38 | + * @param array $options |
|
| 39 | + * @return null|ISchemaWrapper |
|
| 40 | + */ |
|
| 41 | + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { |
|
| 42 | + /** @var ISchemaWrapper $schema */ |
|
| 43 | + $schema = $schemaClosure(); |
|
| 44 | 44 | |
| 45 | - $table = $schema->getTable('share'); |
|
| 46 | - $table->addColumn('hide_download', 'smallint', [ |
|
| 47 | - 'notnull' => false, |
|
| 48 | - 'length' => 1, |
|
| 49 | - 'default' => 0, |
|
| 50 | - ]); |
|
| 45 | + $table = $schema->getTable('share'); |
|
| 46 | + $table->addColumn('hide_download', 'smallint', [ |
|
| 47 | + 'notnull' => false, |
|
| 48 | + 'length' => 1, |
|
| 49 | + 'default' => 0, |
|
| 50 | + ]); |
|
| 51 | 51 | |
| 52 | - return $schema; |
|
| 53 | - } |
|
| 52 | + return $schema; |
|
| 53 | + } |
|
| 54 | 54 | } |
@@ -33,24 +33,24 @@ |
||
| 33 | 33 | use OCP\Migration\SimpleMigrationStep; |
| 34 | 34 | |
| 35 | 35 | class Version25000Date20220602190540 extends SimpleMigrationStep { |
| 36 | - /** |
|
| 37 | - * @param IOutput $output |
|
| 38 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
| 39 | - * @param array $options |
|
| 40 | - * @return null|ISchemaWrapper |
|
| 41 | - */ |
|
| 42 | - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { |
|
| 43 | - /** @var ISchemaWrapper $schema */ |
|
| 44 | - $schema = $schemaClosure(); |
|
| 36 | + /** |
|
| 37 | + * @param IOutput $output |
|
| 38 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
| 39 | + * @param array $options |
|
| 40 | + * @return null|ISchemaWrapper |
|
| 41 | + */ |
|
| 42 | + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { |
|
| 43 | + /** @var ISchemaWrapper $schema */ |
|
| 44 | + $schema = $schemaClosure(); |
|
| 45 | 45 | |
| 46 | - $comments = $schema->getTable('comments'); |
|
| 47 | - if (!$comments->hasColumn('expire_date')) { |
|
| 48 | - $comments->addColumn('expire_date', Types::DATETIME, [ |
|
| 49 | - 'notnull' => false, |
|
| 50 | - ]); |
|
| 51 | - $comments->addIndex(['expire_date'], 'expire_date'); |
|
| 52 | - return $schema; |
|
| 53 | - } |
|
| 54 | - return null; |
|
| 55 | - } |
|
| 46 | + $comments = $schema->getTable('comments'); |
|
| 47 | + if (!$comments->hasColumn('expire_date')) { |
|
| 48 | + $comments->addColumn('expire_date', Types::DATETIME, [ |
|
| 49 | + 'notnull' => false, |
|
| 50 | + ]); |
|
| 51 | + $comments->addIndex(['expire_date'], 'expire_date'); |
|
| 52 | + return $schema; |
|
| 53 | + } |
|
| 54 | + return null; |
|
| 55 | + } |
|
| 56 | 56 | } |
@@ -33,24 +33,24 @@ |
||
| 33 | 33 | use OCP\Migration\SimpleMigrationStep; |
| 34 | 34 | |
| 35 | 35 | class Version25000Date20220905140840 extends SimpleMigrationStep { |
| 36 | - /** |
|
| 37 | - * @param IOutput $output |
|
| 38 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
| 39 | - * @param array $options |
|
| 40 | - * @return null|ISchemaWrapper |
|
| 41 | - */ |
|
| 42 | - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { |
|
| 43 | - /** @var ISchemaWrapper $schema */ |
|
| 44 | - $schema = $schemaClosure(); |
|
| 36 | + /** |
|
| 37 | + * @param IOutput $output |
|
| 38 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
| 39 | + * @param array $options |
|
| 40 | + * @return null|ISchemaWrapper |
|
| 41 | + */ |
|
| 42 | + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { |
|
| 43 | + /** @var ISchemaWrapper $schema */ |
|
| 44 | + $schema = $schemaClosure(); |
|
| 45 | 45 | |
| 46 | - $authTokenTable = $schema->getTable('authtoken'); |
|
| 47 | - if (!$authTokenTable->hasColumn('password_hash')) { |
|
| 48 | - $authTokenTable->addColumn('password_hash', Types::STRING, [ |
|
| 49 | - 'notnull' => false, |
|
| 50 | - 'length' => 255, |
|
| 51 | - ]); |
|
| 52 | - return $schema; |
|
| 53 | - } |
|
| 54 | - return null; |
|
| 55 | - } |
|
| 46 | + $authTokenTable = $schema->getTable('authtoken'); |
|
| 47 | + if (!$authTokenTable->hasColumn('password_hash')) { |
|
| 48 | + $authTokenTable->addColumn('password_hash', Types::STRING, [ |
|
| 49 | + 'notnull' => false, |
|
| 50 | + 'length' => 255, |
|
| 51 | + ]); |
|
| 52 | + return $schema; |
|
| 53 | + } |
|
| 54 | + return null; |
|
| 55 | + } |
|
| 56 | 56 | } |
@@ -34,41 +34,41 @@ |
||
| 34 | 34 | * @since 14.0.0 |
| 35 | 35 | */ |
| 36 | 36 | abstract class ABackend implements IUserBackend, UserInterface { |
| 37 | - /** |
|
| 38 | - * @deprecated 14.0.0 |
|
| 39 | - * @since 14.0.0 |
|
| 40 | - * |
|
| 41 | - * @param int $actions The action to check for |
|
| 42 | - * @return bool |
|
| 43 | - */ |
|
| 44 | - public function implementsActions($actions): bool { |
|
| 45 | - $implements = 0; |
|
| 37 | + /** |
|
| 38 | + * @deprecated 14.0.0 |
|
| 39 | + * @since 14.0.0 |
|
| 40 | + * |
|
| 41 | + * @param int $actions The action to check for |
|
| 42 | + * @return bool |
|
| 43 | + */ |
|
| 44 | + public function implementsActions($actions): bool { |
|
| 45 | + $implements = 0; |
|
| 46 | 46 | |
| 47 | - if ($this instanceof ICreateUserBackend) { |
|
| 48 | - $implements |= Backend::CREATE_USER; |
|
| 49 | - } |
|
| 50 | - if ($this instanceof ISetPasswordBackend) { |
|
| 51 | - $implements |= Backend::SET_PASSWORD; |
|
| 52 | - } |
|
| 53 | - if ($this instanceof ICheckPasswordBackend) { |
|
| 54 | - $implements |= Backend::CHECK_PASSWORD; |
|
| 55 | - } |
|
| 56 | - if ($this instanceof IGetHomeBackend) { |
|
| 57 | - $implements |= Backend::GET_HOME; |
|
| 58 | - } |
|
| 59 | - if ($this instanceof IGetDisplayNameBackend) { |
|
| 60 | - $implements |= Backend::GET_DISPLAYNAME; |
|
| 61 | - } |
|
| 62 | - if ($this instanceof ISetDisplayNameBackend) { |
|
| 63 | - $implements |= Backend::SET_DISPLAYNAME; |
|
| 64 | - } |
|
| 65 | - if ($this instanceof IProvideAvatarBackend) { |
|
| 66 | - $implements |= Backend::PROVIDE_AVATAR; |
|
| 67 | - } |
|
| 68 | - if ($this instanceof ICountUsersBackend) { |
|
| 69 | - $implements |= Backend::COUNT_USERS; |
|
| 70 | - } |
|
| 47 | + if ($this instanceof ICreateUserBackend) { |
|
| 48 | + $implements |= Backend::CREATE_USER; |
|
| 49 | + } |
|
| 50 | + if ($this instanceof ISetPasswordBackend) { |
|
| 51 | + $implements |= Backend::SET_PASSWORD; |
|
| 52 | + } |
|
| 53 | + if ($this instanceof ICheckPasswordBackend) { |
|
| 54 | + $implements |= Backend::CHECK_PASSWORD; |
|
| 55 | + } |
|
| 56 | + if ($this instanceof IGetHomeBackend) { |
|
| 57 | + $implements |= Backend::GET_HOME; |
|
| 58 | + } |
|
| 59 | + if ($this instanceof IGetDisplayNameBackend) { |
|
| 60 | + $implements |= Backend::GET_DISPLAYNAME; |
|
| 61 | + } |
|
| 62 | + if ($this instanceof ISetDisplayNameBackend) { |
|
| 63 | + $implements |= Backend::SET_DISPLAYNAME; |
|
| 64 | + } |
|
| 65 | + if ($this instanceof IProvideAvatarBackend) { |
|
| 66 | + $implements |= Backend::PROVIDE_AVATAR; |
|
| 67 | + } |
|
| 68 | + if ($this instanceof ICountUsersBackend) { |
|
| 69 | + $implements |= Backend::COUNT_USERS; |
|
| 70 | + } |
|
| 71 | 71 | |
| 72 | - return (bool)($actions & $implements); |
|
| 73 | - } |
|
| 72 | + return (bool)($actions & $implements); |
|
| 73 | + } |
|
| 74 | 74 | } |
@@ -32,14 +32,14 @@ |
||
| 32 | 32 | * @template-extends ServiceRegistration<Middleware> |
| 33 | 33 | */ |
| 34 | 34 | class MiddlewareRegistration extends ServiceRegistration { |
| 35 | - private bool $global; |
|
| 35 | + private bool $global; |
|
| 36 | 36 | |
| 37 | - public function __construct(string $appId, string $service, bool $global) { |
|
| 38 | - parent::__construct($appId, $service); |
|
| 39 | - $this->global = $global; |
|
| 40 | - } |
|
| 37 | + public function __construct(string $appId, string $service, bool $global) { |
|
| 38 | + parent::__construct($appId, $service); |
|
| 39 | + $this->global = $global; |
|
| 40 | + } |
|
| 41 | 41 | |
| 42 | - public function isGlobal(): bool { |
|
| 43 | - return $this->global; |
|
| 44 | - } |
|
| 42 | + public function isGlobal(): bool { |
|
| 43 | + return $this->global; |
|
| 44 | + } |
|
| 45 | 45 | } |