@@ -34,73 +34,73 @@ |
||
34 | 34 | * @since 6.0.0 |
35 | 35 | */ |
36 | 36 | interface IAvatar { |
37 | - /** |
|
38 | - * Get the users avatar |
|
39 | - * |
|
40 | - * @param int $size size in px of the avatar, avatars are square, defaults to 64, -1 can be used to not scale the image |
|
41 | - * @param bool $darkTheme Should the generated avatar be dark themed |
|
42 | - * @return false|\OCP\IImage containing the avatar or false if there's no image |
|
43 | - * @since 6.0.0 - size of -1 was added in 9.0.0 |
|
44 | - */ |
|
45 | - public function get(int $size = 64, bool $darkTheme = false); |
|
37 | + /** |
|
38 | + * Get the users avatar |
|
39 | + * |
|
40 | + * @param int $size size in px of the avatar, avatars are square, defaults to 64, -1 can be used to not scale the image |
|
41 | + * @param bool $darkTheme Should the generated avatar be dark themed |
|
42 | + * @return false|\OCP\IImage containing the avatar or false if there's no image |
|
43 | + * @since 6.0.0 - size of -1 was added in 9.0.0 |
|
44 | + */ |
|
45 | + public function get(int $size = 64, bool $darkTheme = false); |
|
46 | 46 | |
47 | - /** |
|
48 | - * Check if an avatar exists for the user |
|
49 | - * |
|
50 | - * @since 8.1.0 |
|
51 | - */ |
|
52 | - public function exists(): bool; |
|
47 | + /** |
|
48 | + * Check if an avatar exists for the user |
|
49 | + * |
|
50 | + * @since 8.1.0 |
|
51 | + */ |
|
52 | + public function exists(): bool; |
|
53 | 53 | |
54 | - /** |
|
55 | - * Check if the avatar of a user is a custom uploaded one |
|
56 | - * |
|
57 | - * @since 14.0.0 |
|
58 | - */ |
|
59 | - public function isCustomAvatar(): bool; |
|
54 | + /** |
|
55 | + * Check if the avatar of a user is a custom uploaded one |
|
56 | + * |
|
57 | + * @since 14.0.0 |
|
58 | + */ |
|
59 | + public function isCustomAvatar(): bool; |
|
60 | 60 | |
61 | - /** |
|
62 | - * Sets the users avatar |
|
63 | - * |
|
64 | - * @param \OCP\IImage|resource|string $data An image object, imagedata or path to set a new avatar |
|
65 | - * @throws \Exception if the provided file is not a jpg or png image |
|
66 | - * @throws \Exception if the provided image is not valid |
|
67 | - * @throws \OC\NotSquareException if the image is not square |
|
68 | - * @since 6.0.0 |
|
69 | - */ |
|
70 | - public function set($data): void; |
|
61 | + /** |
|
62 | + * Sets the users avatar |
|
63 | + * |
|
64 | + * @param \OCP\IImage|resource|string $data An image object, imagedata or path to set a new avatar |
|
65 | + * @throws \Exception if the provided file is not a jpg or png image |
|
66 | + * @throws \Exception if the provided image is not valid |
|
67 | + * @throws \OC\NotSquareException if the image is not square |
|
68 | + * @since 6.0.0 |
|
69 | + */ |
|
70 | + public function set($data): void; |
|
71 | 71 | |
72 | - /** |
|
73 | - * Remove the user's avatar |
|
74 | - * |
|
75 | - * @param bool $silent Whether removing the avatar should trigger a change |
|
76 | - * @since 6.0.0 |
|
77 | - */ |
|
78 | - public function remove(bool $silent = false): void; |
|
72 | + /** |
|
73 | + * Remove the user's avatar |
|
74 | + * |
|
75 | + * @param bool $silent Whether removing the avatar should trigger a change |
|
76 | + * @since 6.0.0 |
|
77 | + */ |
|
78 | + public function remove(bool $silent = false): void; |
|
79 | 79 | |
80 | - /** |
|
81 | - * Get the file of the avatar |
|
82 | - * |
|
83 | - * @param int $size The desired image size. -1 can be used to not scale the image |
|
84 | - * @param bool $darkTheme Should the generated avatar be dark themed |
|
85 | - * @throws NotFoundException |
|
86 | - * @since 9.0.0 |
|
87 | - */ |
|
88 | - public function getFile(int $size, bool $darkTheme = false): ISimpleFile; |
|
80 | + /** |
|
81 | + * Get the file of the avatar |
|
82 | + * |
|
83 | + * @param int $size The desired image size. -1 can be used to not scale the image |
|
84 | + * @param bool $darkTheme Should the generated avatar be dark themed |
|
85 | + * @throws NotFoundException |
|
86 | + * @since 9.0.0 |
|
87 | + */ |
|
88 | + public function getFile(int $size, bool $darkTheme = false): ISimpleFile; |
|
89 | 89 | |
90 | - /** |
|
91 | - * Get the avatar background color |
|
92 | - * |
|
93 | - * @since 14.0.0 |
|
94 | - */ |
|
95 | - public function avatarBackgroundColor(string $hash): Color; |
|
90 | + /** |
|
91 | + * Get the avatar background color |
|
92 | + * |
|
93 | + * @since 14.0.0 |
|
94 | + */ |
|
95 | + public function avatarBackgroundColor(string $hash): Color; |
|
96 | 96 | |
97 | - /** |
|
98 | - * Updates the display name if changed. |
|
99 | - * |
|
100 | - * @param string $feature The changed feature |
|
101 | - * @param mixed $oldValue The previous value |
|
102 | - * @param mixed $newValue The new value |
|
103 | - * @since 13.0.0 |
|
104 | - */ |
|
105 | - public function userChanged(string $feature, $oldValue, $newValue): void; |
|
97 | + /** |
|
98 | + * Updates the display name if changed. |
|
99 | + * |
|
100 | + * @param string $feature The changed feature |
|
101 | + * @param mixed $oldValue The previous value |
|
102 | + * @param mixed $newValue The new value |
|
103 | + * @since 13.0.0 |
|
104 | + */ |
|
105 | + public function userChanged(string $feature, $oldValue, $newValue): void; |
|
106 | 106 | } |
@@ -29,14 +29,14 @@ |
||
29 | 29 | * @since 15.0.0 |
30 | 30 | */ |
31 | 31 | interface ICollectBreadcrumbs extends IReporter { |
32 | - /** |
|
33 | - * Collect breadcrumbs for crash reports |
|
34 | - * |
|
35 | - * @param string $message |
|
36 | - * @param string $category |
|
37 | - * @param array $context |
|
38 | - * |
|
39 | - * @since 15.0.0 |
|
40 | - */ |
|
41 | - public function collect(string $message, string $category, array $context = []); |
|
32 | + /** |
|
33 | + * Collect breadcrumbs for crash reports |
|
34 | + * |
|
35 | + * @param string $message |
|
36 | + * @param string $category |
|
37 | + * @param array $context |
|
38 | + * |
|
39 | + * @since 15.0.0 |
|
40 | + */ |
|
41 | + public function collect(string $message, string $category, array $context = []); |
|
42 | 42 | } |
@@ -32,12 +32,12 @@ |
||
32 | 32 | * @since 13.0.0 |
33 | 33 | */ |
34 | 34 | interface IReporter { |
35 | - /** |
|
36 | - * Report an (unhandled) exception |
|
37 | - * |
|
38 | - * @since 13.0.0 |
|
39 | - * @param Exception|Throwable $exception |
|
40 | - * @param array $context |
|
41 | - */ |
|
42 | - public function report($exception, array $context = []); |
|
35 | + /** |
|
36 | + * Report an (unhandled) exception |
|
37 | + * |
|
38 | + * @since 13.0.0 |
|
39 | + * @param Exception|Throwable $exception |
|
40 | + * @param array $context |
|
41 | + */ |
|
42 | + public function report($exception, array $context = []); |
|
43 | 43 | } |
@@ -29,13 +29,13 @@ |
||
29 | 29 | * @since 17.0.0 |
30 | 30 | */ |
31 | 31 | interface IMessageReporter extends IReporter { |
32 | - /** |
|
33 | - * Report a (error) message |
|
34 | - * |
|
35 | - * @param string $message |
|
36 | - * @param array $context |
|
37 | - * |
|
38 | - * @since 17.0.0 |
|
39 | - */ |
|
40 | - public function reportMessage(string $message, array $context = []): void; |
|
32 | + /** |
|
33 | + * Report a (error) message |
|
34 | + * |
|
35 | + * @param string $message |
|
36 | + * @param array $context |
|
37 | + * |
|
38 | + * @since 17.0.0 |
|
39 | + */ |
|
40 | + public function reportMessage(string $message, array $context = []): void; |
|
41 | 41 | } |
@@ -34,55 +34,55 @@ |
||
34 | 34 | * @since 17.0.0 |
35 | 35 | */ |
36 | 36 | interface IRegistry { |
37 | - /** |
|
38 | - * Register a subscription instance. In case it is called multiple times an |
|
39 | - * exception is thrown |
|
40 | - * |
|
41 | - * @param ISubscription $subscription |
|
42 | - * @throws AlreadyRegisteredException |
|
43 | - * |
|
44 | - * @since 17.0.0 |
|
45 | - * @deprecated 20.0.0 use registerService |
|
46 | - */ |
|
47 | - public function register(ISubscription $subscription): void; |
|
37 | + /** |
|
38 | + * Register a subscription instance. In case it is called multiple times an |
|
39 | + * exception is thrown |
|
40 | + * |
|
41 | + * @param ISubscription $subscription |
|
42 | + * @throws AlreadyRegisteredException |
|
43 | + * |
|
44 | + * @since 17.0.0 |
|
45 | + * @deprecated 20.0.0 use registerService |
|
46 | + */ |
|
47 | + public function register(ISubscription $subscription): void; |
|
48 | 48 | |
49 | - /** |
|
50 | - * Register a subscription handler. The service has to implement the ISubscription interface. |
|
51 | - * In case this is called multiple times an exception is thrown. |
|
52 | - * |
|
53 | - * @param string $subscriptionService |
|
54 | - * @throws AlreadyRegisteredException |
|
55 | - * |
|
56 | - * @since 20.0.0 |
|
57 | - */ |
|
58 | - public function registerService(string $subscriptionService): void; |
|
49 | + /** |
|
50 | + * Register a subscription handler. The service has to implement the ISubscription interface. |
|
51 | + * In case this is called multiple times an exception is thrown. |
|
52 | + * |
|
53 | + * @param string $subscriptionService |
|
54 | + * @throws AlreadyRegisteredException |
|
55 | + * |
|
56 | + * @since 20.0.0 |
|
57 | + */ |
|
58 | + public function registerService(string $subscriptionService): void; |
|
59 | 59 | |
60 | - /** |
|
61 | - * Fetches the list of app IDs that are supported by the subscription |
|
62 | - * |
|
63 | - * @since 17.0.0 |
|
64 | - */ |
|
65 | - public function delegateGetSupportedApps(): array; |
|
60 | + /** |
|
61 | + * Fetches the list of app IDs that are supported by the subscription |
|
62 | + * |
|
63 | + * @since 17.0.0 |
|
64 | + */ |
|
65 | + public function delegateGetSupportedApps(): array; |
|
66 | 66 | |
67 | - /** |
|
68 | - * Indicates if a valid subscription is available |
|
69 | - * |
|
70 | - * @since 17.0.0 |
|
71 | - */ |
|
72 | - public function delegateHasValidSubscription(): bool; |
|
67 | + /** |
|
68 | + * Indicates if a valid subscription is available |
|
69 | + * |
|
70 | + * @since 17.0.0 |
|
71 | + */ |
|
72 | + public function delegateHasValidSubscription(): bool; |
|
73 | 73 | |
74 | - /** |
|
75 | - * Indicates if the subscription has extended support |
|
76 | - * |
|
77 | - * @since 17.0.0 |
|
78 | - */ |
|
79 | - public function delegateHasExtendedSupport(): bool; |
|
74 | + /** |
|
75 | + * Indicates if the subscription has extended support |
|
76 | + * |
|
77 | + * @since 17.0.0 |
|
78 | + */ |
|
79 | + public function delegateHasExtendedSupport(): bool; |
|
80 | 80 | |
81 | - /** |
|
82 | - * Indicates if a hard user limit is reached and no new users should be created |
|
83 | - * |
|
84 | - * @param IManager|null $notificationManager |
|
85 | - * @since 21.0.0 |
|
86 | - */ |
|
87 | - public function delegateIsHardUserLimitReached(?IManager $notificationManager = null): bool; |
|
81 | + /** |
|
82 | + * Indicates if a hard user limit is reached and no new users should be created |
|
83 | + * |
|
84 | + * @param IManager|null $notificationManager |
|
85 | + * @since 21.0.0 |
|
86 | + */ |
|
87 | + public function delegateIsHardUserLimitReached(?IManager $notificationManager = null): bool; |
|
88 | 88 | } |
@@ -29,10 +29,10 @@ |
||
29 | 29 | * @since 17.0.0 |
30 | 30 | */ |
31 | 31 | interface ISupportedApps extends ISubscription { |
32 | - /** |
|
33 | - * Fetches the list of app IDs that are supported by the subscription |
|
34 | - * |
|
35 | - * @since 17.0.0 |
|
36 | - */ |
|
37 | - public function getSupportedApps(): array; |
|
32 | + /** |
|
33 | + * Fetches the list of app IDs that are supported by the subscription |
|
34 | + * |
|
35 | + * @since 17.0.0 |
|
36 | + */ |
|
37 | + public function getSupportedApps(): array; |
|
38 | 38 | } |
@@ -30,24 +30,24 @@ |
||
30 | 30 | * @since 17.0.0 |
31 | 31 | */ |
32 | 32 | interface ISubscription { |
33 | - /** |
|
34 | - * Indicates if a valid subscription is available |
|
35 | - * |
|
36 | - * @since 17.0.0 |
|
37 | - */ |
|
38 | - public function hasValidSubscription(): bool; |
|
33 | + /** |
|
34 | + * Indicates if a valid subscription is available |
|
35 | + * |
|
36 | + * @since 17.0.0 |
|
37 | + */ |
|
38 | + public function hasValidSubscription(): bool; |
|
39 | 39 | |
40 | - /** |
|
41 | - * Indicates if the subscription has extended support |
|
42 | - * |
|
43 | - * @since 17.0.0 |
|
44 | - */ |
|
45 | - public function hasExtendedSupport(): bool; |
|
40 | + /** |
|
41 | + * Indicates if the subscription has extended support |
|
42 | + * |
|
43 | + * @since 17.0.0 |
|
44 | + */ |
|
45 | + public function hasExtendedSupport(): bool; |
|
46 | 46 | |
47 | - /** |
|
48 | - * Indicates if a hard user limit is reached and no new users should be created |
|
49 | - * |
|
50 | - * @since 21.0.0 |
|
51 | - */ |
|
52 | - public function isHardUserLimitReached(): bool; |
|
47 | + /** |
|
48 | + * Indicates if a hard user limit is reached and no new users should be created |
|
49 | + * |
|
50 | + * @since 21.0.0 |
|
51 | + */ |
|
52 | + public function isHardUserLimitReached(): bool; |
|
53 | 53 | } |
@@ -32,42 +32,42 @@ |
||
32 | 32 | * @since 8.2.0 |
33 | 33 | */ |
34 | 34 | interface ICredentialsManager { |
35 | - /** |
|
36 | - * Store a set of credentials |
|
37 | - * |
|
38 | - * @param string $userId empty string for system-wide credentials |
|
39 | - * @param string $identifier |
|
40 | - * @param mixed $credentials |
|
41 | - * @since 8.2.0 |
|
42 | - */ |
|
43 | - public function store(string $userId, string $identifier, $credentials): void; |
|
35 | + /** |
|
36 | + * Store a set of credentials |
|
37 | + * |
|
38 | + * @param string $userId empty string for system-wide credentials |
|
39 | + * @param string $identifier |
|
40 | + * @param mixed $credentials |
|
41 | + * @since 8.2.0 |
|
42 | + */ |
|
43 | + public function store(string $userId, string $identifier, $credentials): void; |
|
44 | 44 | |
45 | - /** |
|
46 | - * Retrieve a set of credentials |
|
47 | - * |
|
48 | - * @param string $userId empty string for system-wide credentials |
|
49 | - * @param string $identifier |
|
50 | - * @return mixed |
|
51 | - * @since 8.2.0 |
|
52 | - */ |
|
53 | - public function retrieve(string $userId, string $identifier); |
|
45 | + /** |
|
46 | + * Retrieve a set of credentials |
|
47 | + * |
|
48 | + * @param string $userId empty string for system-wide credentials |
|
49 | + * @param string $identifier |
|
50 | + * @return mixed |
|
51 | + * @since 8.2.0 |
|
52 | + */ |
|
53 | + public function retrieve(string $userId, string $identifier); |
|
54 | 54 | |
55 | - /** |
|
56 | - * Delete a set of credentials |
|
57 | - * |
|
58 | - * @param string $userId empty string for system-wide credentials |
|
59 | - * @param string $identifier |
|
60 | - * @return int rows removed |
|
61 | - * @since 8.2.0 |
|
62 | - */ |
|
63 | - public function delete(string $userId, string $identifier): int; |
|
55 | + /** |
|
56 | + * Delete a set of credentials |
|
57 | + * |
|
58 | + * @param string $userId empty string for system-wide credentials |
|
59 | + * @param string $identifier |
|
60 | + * @return int rows removed |
|
61 | + * @since 8.2.0 |
|
62 | + */ |
|
63 | + public function delete(string $userId, string $identifier): int; |
|
64 | 64 | |
65 | - /** |
|
66 | - * Erase all credentials stored for a user |
|
67 | - * |
|
68 | - * @param string $userId |
|
69 | - * @return int rows removed |
|
70 | - * @since 8.2.0 |
|
71 | - */ |
|
72 | - public function erase(string $userId): int; |
|
65 | + /** |
|
66 | + * Erase all credentials stored for a user |
|
67 | + * |
|
68 | + * @param string $userId |
|
69 | + * @return int rows removed |
|
70 | + * @since 8.2.0 |
|
71 | + */ |
|
72 | + public function erase(string $userId): int; |
|
73 | 73 | } |
@@ -37,21 +37,21 @@ |
||
37 | 37 | * @since 17.0.0 |
38 | 38 | */ |
39 | 39 | class AddFeaturePolicyEvent extends Event { |
40 | - /** @var FeaturePolicyManager */ |
|
41 | - private $policyManager; |
|
40 | + /** @var FeaturePolicyManager */ |
|
41 | + private $policyManager; |
|
42 | 42 | |
43 | - /** |
|
44 | - * @since 17.0.0 |
|
45 | - */ |
|
46 | - public function __construct(FeaturePolicyManager $policyManager) { |
|
47 | - parent::__construct(); |
|
48 | - $this->policyManager = $policyManager; |
|
49 | - } |
|
43 | + /** |
|
44 | + * @since 17.0.0 |
|
45 | + */ |
|
46 | + public function __construct(FeaturePolicyManager $policyManager) { |
|
47 | + parent::__construct(); |
|
48 | + $this->policyManager = $policyManager; |
|
49 | + } |
|
50 | 50 | |
51 | - /** |
|
52 | - * @since 17.0.0 |
|
53 | - */ |
|
54 | - public function addPolicy(EmptyFeaturePolicy $policy) { |
|
55 | - $this->policyManager->addDefaultPolicy($policy); |
|
56 | - } |
|
51 | + /** |
|
52 | + * @since 17.0.0 |
|
53 | + */ |
|
54 | + public function addPolicy(EmptyFeaturePolicy $policy) { |
|
55 | + $this->policyManager->addDefaultPolicy($policy); |
|
56 | + } |
|
57 | 57 | } |