@@ -32,13 +32,13 @@ |
||
32 | 32 | * @since 26.0.0 |
33 | 33 | */ |
34 | 34 | interface IAssertion { |
35 | - /** |
|
36 | - * This method throws a localized exception when user limits are exceeded, |
|
37 | - * if applicable. Notifications are also created in that case. It is a |
|
38 | - * shorthand for a check against IRegistry::delegateIsHardUserLimitReached(). |
|
39 | - * |
|
40 | - * @throws HintException |
|
41 | - * @since 26.0.0 |
|
42 | - */ |
|
43 | - public function createUserIsLegit(): void; |
|
35 | + /** |
|
36 | + * This method throws a localized exception when user limits are exceeded, |
|
37 | + * if applicable. Notifications are also created in that case. It is a |
|
38 | + * shorthand for a check against IRegistry::delegateIsHardUserLimitReached(). |
|
39 | + * |
|
40 | + * @throws HintException |
|
41 | + * @since 26.0.0 |
|
42 | + */ |
|
43 | + public function createUserIsLegit(): void; |
|
44 | 44 | } |
@@ -30,10 +30,10 @@ |
||
30 | 30 | * @since 24.0.7 |
31 | 31 | */ |
32 | 32 | interface ICountMappedUsersBackend { |
33 | - /** |
|
34 | - * @since 24.0.7 |
|
35 | - * |
|
36 | - * @return int The number of users already mapped to a Nextcloud account |
|
37 | - */ |
|
38 | - public function countMappedUsers(): int; |
|
33 | + /** |
|
34 | + * @since 24.0.7 |
|
35 | + * |
|
36 | + * @return int The number of users already mapped to a Nextcloud account |
|
37 | + */ |
|
38 | + public function countMappedUsers(): int; |
|
39 | 39 | } |
@@ -33,23 +33,23 @@ |
||
33 | 33 | use OCP\Support\Subscription\IRegistry; |
34 | 34 | |
35 | 35 | class Assertion implements IAssertion { |
36 | - private IRegistry $registry; |
|
37 | - private IFactory $l10nFactory; |
|
38 | - private IManager $notificationManager; |
|
36 | + private IRegistry $registry; |
|
37 | + private IFactory $l10nFactory; |
|
38 | + private IManager $notificationManager; |
|
39 | 39 | |
40 | - public function __construct(IRegistry $registry, IFactory $l10nFactory, IManager $notificationManager) { |
|
41 | - $this->registry = $registry; |
|
42 | - $this->l10nFactory = $l10nFactory; |
|
43 | - $this->notificationManager = $notificationManager; |
|
44 | - } |
|
40 | + public function __construct(IRegistry $registry, IFactory $l10nFactory, IManager $notificationManager) { |
|
41 | + $this->registry = $registry; |
|
42 | + $this->l10nFactory = $l10nFactory; |
|
43 | + $this->notificationManager = $notificationManager; |
|
44 | + } |
|
45 | 45 | |
46 | - /** |
|
47 | - * @inheritDoc |
|
48 | - */ |
|
49 | - public function createUserIsLegit(): void { |
|
50 | - if ($this->registry->delegateIsHardUserLimitReached($this->notificationManager)) { |
|
51 | - $l = $this->l10nFactory->get('lib'); |
|
52 | - throw new HintException($l->t('The user was not created because the user limit has been reached. Check your notifications to learn more.')); |
|
53 | - } |
|
54 | - } |
|
46 | + /** |
|
47 | + * @inheritDoc |
|
48 | + */ |
|
49 | + public function createUserIsLegit(): void { |
|
50 | + if ($this->registry->delegateIsHardUserLimitReached($this->notificationManager)) { |
|
51 | + $l = $this->l10nFactory->get('lib'); |
|
52 | + throw new HintException($l->t('The user was not created because the user limit has been reached. Check your notifications to learn more.')); |
|
53 | + } |
|
54 | + } |
|
55 | 55 | } |
@@ -32,63 +32,63 @@ |
||
32 | 32 | * @since 26.0.0 |
33 | 33 | */ |
34 | 34 | class GroupChangedEvent extends Event { |
35 | - private IGroup $group; |
|
36 | - private string $feature; |
|
37 | - /** @var mixed */ |
|
38 | - private $value; |
|
39 | - /** @var mixed */ |
|
40 | - private $oldValue; |
|
35 | + private IGroup $group; |
|
36 | + private string $feature; |
|
37 | + /** @var mixed */ |
|
38 | + private $value; |
|
39 | + /** @var mixed */ |
|
40 | + private $oldValue; |
|
41 | 41 | |
42 | - /** |
|
43 | - * @since 26.0.0 |
|
44 | - */ |
|
45 | - public function __construct(IGroup $group, |
|
46 | - string $feature, |
|
47 | - $value, |
|
48 | - $oldValue = null) { |
|
49 | - parent::__construct(); |
|
50 | - $this->group = $group; |
|
51 | - $this->feature = $feature; |
|
52 | - $this->value = $value; |
|
53 | - $this->oldValue = $oldValue; |
|
54 | - } |
|
42 | + /** |
|
43 | + * @since 26.0.0 |
|
44 | + */ |
|
45 | + public function __construct(IGroup $group, |
|
46 | + string $feature, |
|
47 | + $value, |
|
48 | + $oldValue = null) { |
|
49 | + parent::__construct(); |
|
50 | + $this->group = $group; |
|
51 | + $this->feature = $feature; |
|
52 | + $this->value = $value; |
|
53 | + $this->oldValue = $oldValue; |
|
54 | + } |
|
55 | 55 | |
56 | - /** |
|
57 | - * |
|
58 | - * @since 26.0.0 |
|
59 | - * |
|
60 | - * @return IGroup |
|
61 | - */ |
|
62 | - public function getGroup(): IGroup { |
|
63 | - return $this->group; |
|
64 | - } |
|
56 | + /** |
|
57 | + * |
|
58 | + * @since 26.0.0 |
|
59 | + * |
|
60 | + * @return IGroup |
|
61 | + */ |
|
62 | + public function getGroup(): IGroup { |
|
63 | + return $this->group; |
|
64 | + } |
|
65 | 65 | |
66 | - /** |
|
67 | - * |
|
68 | - * @since 26.0.0 |
|
69 | - * |
|
70 | - * @return string |
|
71 | - */ |
|
72 | - public function getFeature(): string { |
|
73 | - return $this->feature; |
|
74 | - } |
|
66 | + /** |
|
67 | + * |
|
68 | + * @since 26.0.0 |
|
69 | + * |
|
70 | + * @return string |
|
71 | + */ |
|
72 | + public function getFeature(): string { |
|
73 | + return $this->feature; |
|
74 | + } |
|
75 | 75 | |
76 | - /** |
|
77 | - * @since 26.0.0 |
|
78 | - * |
|
79 | - * @return mixed |
|
80 | - */ |
|
81 | - public function getValue() { |
|
82 | - return $this->value; |
|
83 | - } |
|
76 | + /** |
|
77 | + * @since 26.0.0 |
|
78 | + * |
|
79 | + * @return mixed |
|
80 | + */ |
|
81 | + public function getValue() { |
|
82 | + return $this->value; |
|
83 | + } |
|
84 | 84 | |
85 | - /** |
|
86 | - * |
|
87 | - * @since 26.0.0 |
|
88 | - * |
|
89 | - * @return mixed |
|
90 | - */ |
|
91 | - public function getOldValue() { |
|
92 | - return $this->oldValue; |
|
93 | - } |
|
85 | + /** |
|
86 | + * |
|
87 | + * @since 26.0.0 |
|
88 | + * |
|
89 | + * @return mixed |
|
90 | + */ |
|
91 | + public function getOldValue() { |
|
92 | + return $this->oldValue; |
|
93 | + } |
|
94 | 94 | } |
@@ -28,21 +28,21 @@ |
||
28 | 28 | use OCP\EventDispatcher\Event; |
29 | 29 | |
30 | 30 | class LoginFailed extends Event { |
31 | - private string $loginName; |
|
32 | - private ?string $password; |
|
31 | + private string $loginName; |
|
32 | + private ?string $password; |
|
33 | 33 | |
34 | - public function __construct(string $loginName, ?string $password) { |
|
35 | - parent::__construct(); |
|
34 | + public function __construct(string $loginName, ?string $password) { |
|
35 | + parent::__construct(); |
|
36 | 36 | |
37 | - $this->loginName = $loginName; |
|
38 | - $this->password = $password; |
|
39 | - } |
|
37 | + $this->loginName = $loginName; |
|
38 | + $this->password = $password; |
|
39 | + } |
|
40 | 40 | |
41 | - public function getLoginName(): string { |
|
42 | - return $this->loginName; |
|
43 | - } |
|
41 | + public function getLoginName(): string { |
|
42 | + return $this->loginName; |
|
43 | + } |
|
44 | 44 | |
45 | - public function getPassword(): ?string { |
|
46 | - return $this->password; |
|
47 | - } |
|
45 | + public function getPassword(): ?string { |
|
46 | + return $this->password; |
|
47 | + } |
|
48 | 48 | } |
@@ -34,47 +34,47 @@ |
||
34 | 34 | * @since 13.0.0 |
35 | 35 | */ |
36 | 36 | interface IMigrationStep { |
37 | - /** |
|
38 | - * Human-readable name of the migration step |
|
39 | - * |
|
40 | - * @return string |
|
41 | - * @since 14.0.0 |
|
42 | - */ |
|
43 | - public function name(): string; |
|
37 | + /** |
|
38 | + * Human-readable name of the migration step |
|
39 | + * |
|
40 | + * @return string |
|
41 | + * @since 14.0.0 |
|
42 | + */ |
|
43 | + public function name(): string; |
|
44 | 44 | |
45 | - /** |
|
46 | - * Human-readable description of the migration step |
|
47 | - * |
|
48 | - * @return string |
|
49 | - * @since 14.0.0 |
|
50 | - */ |
|
51 | - public function description(): string; |
|
45 | + /** |
|
46 | + * Human-readable description of the migration step |
|
47 | + * |
|
48 | + * @return string |
|
49 | + * @since 14.0.0 |
|
50 | + */ |
|
51 | + public function description(): string; |
|
52 | 52 | |
53 | - /** |
|
54 | - * @param IOutput $output |
|
55 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
56 | - * @psalm-param Closure():ISchemaWrapper $schemaClosure |
|
57 | - * @param array $options |
|
58 | - * @since 13.0.0 |
|
59 | - */ |
|
60 | - public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options); |
|
53 | + /** |
|
54 | + * @param IOutput $output |
|
55 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
56 | + * @psalm-param Closure():ISchemaWrapper $schemaClosure |
|
57 | + * @param array $options |
|
58 | + * @since 13.0.0 |
|
59 | + */ |
|
60 | + public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options); |
|
61 | 61 | |
62 | - /** |
|
63 | - * @param IOutput $output |
|
64 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
65 | - * @psalm-param Closure():ISchemaWrapper $schemaClosure |
|
66 | - * @param array $options |
|
67 | - * @return null|ISchemaWrapper |
|
68 | - * @since 13.0.0 |
|
69 | - */ |
|
70 | - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options); |
|
62 | + /** |
|
63 | + * @param IOutput $output |
|
64 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
65 | + * @psalm-param Closure():ISchemaWrapper $schemaClosure |
|
66 | + * @param array $options |
|
67 | + * @return null|ISchemaWrapper |
|
68 | + * @since 13.0.0 |
|
69 | + */ |
|
70 | + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options); |
|
71 | 71 | |
72 | - /** |
|
73 | - * @param IOutput $output |
|
74 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
75 | - * @psalm-param Closure():ISchemaWrapper $schemaClosure |
|
76 | - * @param array $options |
|
77 | - * @since 13.0.0 |
|
78 | - */ |
|
79 | - public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options); |
|
72 | + /** |
|
73 | + * @param IOutput $output |
|
74 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
75 | + * @psalm-param Closure():ISchemaWrapper $schemaClosure |
|
76 | + * @param array $options |
|
77 | + * @since 13.0.0 |
|
78 | + */ |
|
79 | + public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options); |
|
80 | 80 | } |
@@ -35,55 +35,55 @@ |
||
35 | 35 | * @since 13.0.0 |
36 | 36 | */ |
37 | 37 | abstract class SimpleMigrationStep implements IMigrationStep { |
38 | - /** |
|
39 | - * Human-readable name of the migration step |
|
40 | - * |
|
41 | - * @return string |
|
42 | - * @since 14.0.0 |
|
43 | - */ |
|
44 | - public function name(): string { |
|
45 | - return ''; |
|
46 | - } |
|
38 | + /** |
|
39 | + * Human-readable name of the migration step |
|
40 | + * |
|
41 | + * @return string |
|
42 | + * @since 14.0.0 |
|
43 | + */ |
|
44 | + public function name(): string { |
|
45 | + return ''; |
|
46 | + } |
|
47 | 47 | |
48 | - /** |
|
49 | - * Human-readable description of the migration step |
|
50 | - * |
|
51 | - * @return string |
|
52 | - * @since 14.0.0 |
|
53 | - */ |
|
54 | - public function description(): string { |
|
55 | - return ''; |
|
56 | - } |
|
48 | + /** |
|
49 | + * Human-readable description of the migration step |
|
50 | + * |
|
51 | + * @return string |
|
52 | + * @since 14.0.0 |
|
53 | + */ |
|
54 | + public function description(): string { |
|
55 | + return ''; |
|
56 | + } |
|
57 | 57 | |
58 | - /** |
|
59 | - * @param IOutput $output |
|
60 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
61 | - * @psalm-param Closure():ISchemaWrapper $schemaClosure |
|
62 | - * @param array $options |
|
63 | - * @since 13.0.0 |
|
64 | - */ |
|
65 | - public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) { |
|
66 | - } |
|
58 | + /** |
|
59 | + * @param IOutput $output |
|
60 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
61 | + * @psalm-param Closure():ISchemaWrapper $schemaClosure |
|
62 | + * @param array $options |
|
63 | + * @since 13.0.0 |
|
64 | + */ |
|
65 | + public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) { |
|
66 | + } |
|
67 | 67 | |
68 | - /** |
|
69 | - * @param IOutput $output |
|
70 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
71 | - * @psalm-param Closure():ISchemaWrapper $schemaClosure |
|
72 | - * @param array $options |
|
73 | - * @return null|ISchemaWrapper |
|
74 | - * @since 13.0.0 |
|
75 | - */ |
|
76 | - public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
77 | - return null; |
|
78 | - } |
|
68 | + /** |
|
69 | + * @param IOutput $output |
|
70 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
71 | + * @psalm-param Closure():ISchemaWrapper $schemaClosure |
|
72 | + * @param array $options |
|
73 | + * @return null|ISchemaWrapper |
|
74 | + * @since 13.0.0 |
|
75 | + */ |
|
76 | + public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
77 | + return null; |
|
78 | + } |
|
79 | 79 | |
80 | - /** |
|
81 | - * @param IOutput $output |
|
82 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
83 | - * @psalm-param Closure():ISchemaWrapper $schemaClosure |
|
84 | - * @param array $options |
|
85 | - * @since 13.0.0 |
|
86 | - */ |
|
87 | - public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) { |
|
88 | - } |
|
80 | + /** |
|
81 | + * @param IOutput $output |
|
82 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
83 | + * @psalm-param Closure():ISchemaWrapper $schemaClosure |
|
84 | + * @param array $options |
|
85 | + * @since 13.0.0 |
|
86 | + */ |
|
87 | + public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) { |
|
88 | + } |
|
89 | 89 | } |
@@ -28,12 +28,12 @@ |
||
28 | 28 | * @since 14.0.0 |
29 | 29 | */ |
30 | 30 | interface IWriter { |
31 | - /** |
|
32 | - * @since 14.0.0 |
|
33 | - * |
|
34 | - * @param string $app |
|
35 | - * @param string|array $message |
|
36 | - * @param int $level |
|
37 | - */ |
|
38 | - public function write(string $app, $message, int $level); |
|
31 | + /** |
|
32 | + * @since 14.0.0 |
|
33 | + * |
|
34 | + * @param string $app |
|
35 | + * @param string|array $message |
|
36 | + * @param int $level |
|
37 | + */ |
|
38 | + public function write(string $app, $message, int $level); |
|
39 | 39 | } |
@@ -32,37 +32,37 @@ |
||
32 | 32 | * checksum name. |
33 | 33 | */ |
34 | 34 | class ChecksumList implements XmlSerializable { |
35 | - public const NS_OWNCLOUD = 'http://owncloud.org/ns'; |
|
35 | + public const NS_OWNCLOUD = 'http://owncloud.org/ns'; |
|
36 | 36 | |
37 | - /** @var string[] of TYPE:CHECKSUM */ |
|
38 | - private array $checksums; |
|
37 | + /** @var string[] of TYPE:CHECKSUM */ |
|
38 | + private array $checksums; |
|
39 | 39 | |
40 | - public function __construct(string $checksum) { |
|
41 | - $this->checksums = explode(' ', $checksum); |
|
42 | - } |
|
40 | + public function __construct(string $checksum) { |
|
41 | + $this->checksums = explode(' ', $checksum); |
|
42 | + } |
|
43 | 43 | |
44 | - /** |
|
45 | - * The xmlSerialize method is called during xml writing. |
|
46 | - * |
|
47 | - * Use the $writer argument to write its own xml serialization. |
|
48 | - * |
|
49 | - * An important note: do _not_ create a parent element. Any element |
|
50 | - * implementing XmlSerializble should only ever write what's considered |
|
51 | - * its 'inner xml'. |
|
52 | - * |
|
53 | - * The parent of the current element is responsible for writing a |
|
54 | - * containing element. |
|
55 | - * |
|
56 | - * This allows serializers to be re-used for different element names. |
|
57 | - * |
|
58 | - * If you are opening new elements, you must also close them again. |
|
59 | - * |
|
60 | - * @param Writer $writer |
|
61 | - * @return void |
|
62 | - */ |
|
63 | - public function xmlSerialize(Writer $writer) { |
|
64 | - foreach ($this->checksums as $checksum) { |
|
65 | - $writer->writeElement('{' . self::NS_OWNCLOUD . '}checksum', $checksum); |
|
66 | - } |
|
67 | - } |
|
44 | + /** |
|
45 | + * The xmlSerialize method is called during xml writing. |
|
46 | + * |
|
47 | + * Use the $writer argument to write its own xml serialization. |
|
48 | + * |
|
49 | + * An important note: do _not_ create a parent element. Any element |
|
50 | + * implementing XmlSerializble should only ever write what's considered |
|
51 | + * its 'inner xml'. |
|
52 | + * |
|
53 | + * The parent of the current element is responsible for writing a |
|
54 | + * containing element. |
|
55 | + * |
|
56 | + * This allows serializers to be re-used for different element names. |
|
57 | + * |
|
58 | + * If you are opening new elements, you must also close them again. |
|
59 | + * |
|
60 | + * @param Writer $writer |
|
61 | + * @return void |
|
62 | + */ |
|
63 | + public function xmlSerialize(Writer $writer) { |
|
64 | + foreach ($this->checksums as $checksum) { |
|
65 | + $writer->writeElement('{' . self::NS_OWNCLOUD . '}checksum', $checksum); |
|
66 | + } |
|
67 | + } |
|
68 | 68 | } |