@@ -37,23 +37,23 @@ |
||
37 | 37 | * @since 17.0.0 |
38 | 38 | */ |
39 | 39 | class FeaturePolicy extends EmptyFeaturePolicy { |
40 | - protected $autoplayDomains = [ |
|
41 | - '\'self\'', |
|
42 | - ]; |
|
40 | + protected $autoplayDomains = [ |
|
41 | + '\'self\'', |
|
42 | + ]; |
|
43 | 43 | |
44 | - /** @var string[] of allowed domains that can access the camera */ |
|
45 | - protected $cameraDomains = []; |
|
44 | + /** @var string[] of allowed domains that can access the camera */ |
|
45 | + protected $cameraDomains = []; |
|
46 | 46 | |
47 | - protected $fullscreenDomains = [ |
|
48 | - '\'self\'', |
|
49 | - ]; |
|
47 | + protected $fullscreenDomains = [ |
|
48 | + '\'self\'', |
|
49 | + ]; |
|
50 | 50 | |
51 | - /** @var string[] of allowed domains that can use the geolocation of the device */ |
|
52 | - protected $geolocationDomains = []; |
|
51 | + /** @var string[] of allowed domains that can use the geolocation of the device */ |
|
52 | + protected $geolocationDomains = []; |
|
53 | 53 | |
54 | - /** @var string[] of allowed domains that can use the microphone */ |
|
55 | - protected $microphoneDomains = []; |
|
54 | + /** @var string[] of allowed domains that can use the microphone */ |
|
55 | + protected $microphoneDomains = []; |
|
56 | 56 | |
57 | - /** @var string[] of allowed domains that can use the payment API */ |
|
58 | - protected $paymentDomains = []; |
|
57 | + /** @var string[] of allowed domains that can use the payment API */ |
|
58 | + protected $paymentDomains = []; |
|
59 | 59 | } |
@@ -26,15 +26,15 @@ |
||
26 | 26 | |
27 | 27 | class NotificationTypeDoesNotExistException extends \Exception { |
28 | 28 | |
29 | - /** |
|
30 | - * NotificationTypeDoesNotExistException constructor. |
|
31 | - * |
|
32 | - * @since 16.0.0 |
|
33 | - * |
|
34 | - * @param string $type ReminderType |
|
35 | - */ |
|
36 | - public function __construct(string $type) { |
|
37 | - parent::__construct("Type $type is not an accepted type of notification"); |
|
38 | - } |
|
29 | + /** |
|
30 | + * NotificationTypeDoesNotExistException constructor. |
|
31 | + * |
|
32 | + * @since 16.0.0 |
|
33 | + * |
|
34 | + * @param string $type ReminderType |
|
35 | + */ |
|
36 | + public function __construct(string $type) { |
|
37 | + parent::__construct("Type $type is not an accepted type of notification"); |
|
38 | + } |
|
39 | 39 | |
40 | 40 | } |
@@ -25,15 +25,15 @@ |
||
25 | 25 | |
26 | 26 | class ProviderNotAvailableException extends \Exception { |
27 | 27 | |
28 | - /** |
|
29 | - * ProviderNotAvailableException constructor. |
|
30 | - * |
|
31 | - * @since 16.0.0 |
|
32 | - * |
|
33 | - * @param string $type ReminderType |
|
34 | - */ |
|
35 | - public function __construct(string $type) { |
|
36 | - parent::__construct("No notification provider for type $type available"); |
|
37 | - } |
|
28 | + /** |
|
29 | + * ProviderNotAvailableException constructor. |
|
30 | + * |
|
31 | + * @since 16.0.0 |
|
32 | + * |
|
33 | + * @param string $type ReminderType |
|
34 | + */ |
|
35 | + public function __construct(string $type) { |
|
36 | + parent::__construct("No notification provider for type $type available"); |
|
37 | + } |
|
38 | 38 | |
39 | 39 | } |
@@ -32,6 +32,6 @@ |
||
32 | 32 | */ |
33 | 33 | class AudioProvider extends PushProvider { |
34 | 34 | |
35 | - /** @var string */ |
|
36 | - public const NOTIFICATION_TYPE = 'AUDIO'; |
|
35 | + /** @var string */ |
|
36 | + public const NOTIFICATION_TYPE = 'AUDIO'; |
|
37 | 37 | } |
@@ -36,11 +36,11 @@ |
||
36 | 36 | } |
37 | 37 | |
38 | 38 | public function getMimeType(): string { |
39 | - return (string)$this->providerV1->getMimeType(); |
|
39 | + return (string) $this->providerV1->getMimeType(); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | public function isAvailable(FileInfo $file): bool { |
43 | - return (bool)$this->providerV1->isAvailable($file); |
|
43 | + return (bool) $this->providerV1->isAvailable($file); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | public function getThumbnail(File $file, int $maxX, int $maxY): ?IImage { |
@@ -34,30 +34,30 @@ |
||
34 | 34 | use OCP\Preview\IProviderV2; |
35 | 35 | |
36 | 36 | class ProviderV1Adapter implements IProviderV2 { |
37 | - private $providerV1; |
|
37 | + private $providerV1; |
|
38 | 38 | |
39 | - public function __construct(IProvider $providerV1) { |
|
40 | - $this->providerV1 = $providerV1; |
|
41 | - } |
|
39 | + public function __construct(IProvider $providerV1) { |
|
40 | + $this->providerV1 = $providerV1; |
|
41 | + } |
|
42 | 42 | |
43 | - public function getMimeType(): string { |
|
44 | - return (string)$this->providerV1->getMimeType(); |
|
45 | - } |
|
43 | + public function getMimeType(): string { |
|
44 | + return (string)$this->providerV1->getMimeType(); |
|
45 | + } |
|
46 | 46 | |
47 | - public function isAvailable(FileInfo $file): bool { |
|
48 | - return (bool)$this->providerV1->isAvailable($file); |
|
49 | - } |
|
47 | + public function isAvailable(FileInfo $file): bool { |
|
48 | + return (bool)$this->providerV1->isAvailable($file); |
|
49 | + } |
|
50 | 50 | |
51 | - public function getThumbnail(File $file, int $maxX, int $maxY): ?IImage { |
|
52 | - [$view, $path] = $this->getViewAndPath($file); |
|
53 | - $thumbnail = $this->providerV1->getThumbnail($path, $maxX, $maxY, false, $view); |
|
54 | - return $thumbnail === false ? null: $thumbnail; |
|
55 | - } |
|
51 | + public function getThumbnail(File $file, int $maxX, int $maxY): ?IImage { |
|
52 | + [$view, $path] = $this->getViewAndPath($file); |
|
53 | + $thumbnail = $this->providerV1->getThumbnail($path, $maxX, $maxY, false, $view); |
|
54 | + return $thumbnail === false ? null: $thumbnail; |
|
55 | + } |
|
56 | 56 | |
57 | - private function getViewAndPath(File $file) { |
|
58 | - $view = new View(dirname($file->getPath())); |
|
59 | - $path = $file->getName(); |
|
57 | + private function getViewAndPath(File $file) { |
|
58 | + $view = new View(dirname($file->getPath())); |
|
59 | + $path = $file->getName(); |
|
60 | 60 | |
61 | - return [$view, $path]; |
|
62 | - } |
|
61 | + return [$view, $path]; |
|
62 | + } |
|
63 | 63 | } |
@@ -155,7 +155,7 @@ |
||
155 | 155 | } |
156 | 156 | |
157 | 157 | public function supportedEntities(): array { |
158 | - return [ File::class ]; |
|
158 | + return [File::class]; |
|
159 | 159 | } |
160 | 160 | |
161 | 161 | public function isAvailableForScope(int $scope): bool { |
@@ -21,138 +21,138 @@ |
||
21 | 21 | use OCP\WorkflowEngine\IFileCheck; |
22 | 22 | |
23 | 23 | class FileSystemTags implements ICheck, IFileCheck { |
24 | - use TFileCheck; |
|
25 | - |
|
26 | - /** @var array */ |
|
27 | - protected $fileIds; |
|
28 | - |
|
29 | - /** @var array */ |
|
30 | - protected $fileSystemTags; |
|
31 | - |
|
32 | - public function __construct( |
|
33 | - protected IL10N $l, |
|
34 | - protected ISystemTagManager $systemTagManager, |
|
35 | - protected ISystemTagObjectMapper $systemTagObjectMapper, |
|
36 | - protected IUserSession $userSession, |
|
37 | - protected IGroupManager $groupManager, |
|
38 | - ) { |
|
39 | - } |
|
40 | - |
|
41 | - /** |
|
42 | - * @param string $operator |
|
43 | - * @param string $value |
|
44 | - * @return bool |
|
45 | - */ |
|
46 | - public function executeCheck($operator, $value) { |
|
47 | - $systemTags = $this->getSystemTags(); |
|
48 | - return ($operator === 'is') === in_array($value, $systemTags); |
|
49 | - } |
|
50 | - |
|
51 | - /** |
|
52 | - * @param string $operator |
|
53 | - * @param string $value |
|
54 | - * @throws \UnexpectedValueException |
|
55 | - */ |
|
56 | - public function validateCheck($operator, $value) { |
|
57 | - if (!in_array($operator, ['is', '!is'])) { |
|
58 | - throw new \UnexpectedValueException($this->l->t('The given operator is invalid'), 1); |
|
59 | - } |
|
60 | - |
|
61 | - try { |
|
62 | - $tags = $this->systemTagManager->getTagsByIds($value); |
|
63 | - |
|
64 | - $user = $this->userSession->getUser(); |
|
65 | - $isAdmin = $user instanceof IUser && $this->groupManager->isAdmin($user->getUID()); |
|
66 | - |
|
67 | - if (!$isAdmin) { |
|
68 | - foreach ($tags as $tag) { |
|
69 | - if (!$tag->isUserVisible()) { |
|
70 | - throw new \UnexpectedValueException($this->l->t('The given tag id is invalid'), 4); |
|
71 | - } |
|
72 | - } |
|
73 | - } |
|
74 | - } catch (TagNotFoundException $e) { |
|
75 | - throw new \UnexpectedValueException($this->l->t('The given tag id is invalid'), 2); |
|
76 | - } catch (\InvalidArgumentException $e) { |
|
77 | - throw new \UnexpectedValueException($this->l->t('The given tag id is invalid'), 3); |
|
78 | - } |
|
79 | - } |
|
80 | - |
|
81 | - /** |
|
82 | - * Get the ids of the assigned system tags |
|
83 | - * @return string[] |
|
84 | - */ |
|
85 | - protected function getSystemTags() { |
|
86 | - $cache = $this->storage->getCache(); |
|
87 | - $fileIds = $this->getFileIds($cache, $this->path, !$this->storage->instanceOfStorage(IHomeStorage::class) || $this->storage->instanceOfStorage(SharedStorage::class)); |
|
88 | - |
|
89 | - $systemTags = []; |
|
90 | - foreach ($fileIds as $i => $fileId) { |
|
91 | - if (isset($this->fileSystemTags[$fileId])) { |
|
92 | - $systemTags[] = $this->fileSystemTags[$fileId]; |
|
93 | - unset($fileIds[$i]); |
|
94 | - } |
|
95 | - } |
|
96 | - |
|
97 | - if (!empty($fileIds)) { |
|
98 | - $mappedSystemTags = $this->systemTagObjectMapper->getTagIdsForObjects($fileIds, 'files'); |
|
99 | - foreach ($mappedSystemTags as $fileId => $fileSystemTags) { |
|
100 | - $this->fileSystemTags[$fileId] = $fileSystemTags; |
|
101 | - $systemTags[] = $fileSystemTags; |
|
102 | - } |
|
103 | - } |
|
104 | - |
|
105 | - $systemTags = call_user_func_array('array_merge', $systemTags); |
|
106 | - $systemTags = array_unique($systemTags); |
|
107 | - return $systemTags; |
|
108 | - } |
|
109 | - |
|
110 | - /** |
|
111 | - * Get the file ids of the given path and its parents |
|
112 | - * @param ICache $cache |
|
113 | - * @param string $path |
|
114 | - * @param bool $isExternalStorage |
|
115 | - * @return int[] |
|
116 | - */ |
|
117 | - protected function getFileIds(ICache $cache, $path, $isExternalStorage) { |
|
118 | - $cacheId = $cache->getNumericStorageId(); |
|
119 | - if ($this->storage->instanceOfStorage(Jail::class)) { |
|
120 | - $absolutePath = $this->storage->getUnjailedPath($path); |
|
121 | - } else { |
|
122 | - $absolutePath = $path; |
|
123 | - } |
|
124 | - |
|
125 | - if (isset($this->fileIds[$cacheId][$absolutePath])) { |
|
126 | - return $this->fileIds[$cacheId][$absolutePath]; |
|
127 | - } |
|
128 | - |
|
129 | - $parentIds = []; |
|
130 | - if ($path !== $this->dirname($path)) { |
|
131 | - $parentIds = $this->getFileIds($cache, $this->dirname($path), $isExternalStorage); |
|
132 | - } elseif (!$isExternalStorage) { |
|
133 | - return []; |
|
134 | - } |
|
135 | - |
|
136 | - $fileId = $cache->getId($path); |
|
137 | - if ($fileId !== -1) { |
|
138 | - $parentIds[] = $fileId; |
|
139 | - } |
|
140 | - |
|
141 | - $this->fileIds[$cacheId][$absolutePath] = $parentIds; |
|
142 | - |
|
143 | - return $parentIds; |
|
144 | - } |
|
145 | - |
|
146 | - protected function dirname($path) { |
|
147 | - $dir = dirname($path); |
|
148 | - return $dir === '.' ? '' : $dir; |
|
149 | - } |
|
150 | - |
|
151 | - public function supportedEntities(): array { |
|
152 | - return [ File::class ]; |
|
153 | - } |
|
154 | - |
|
155 | - public function isAvailableForScope(int $scope): bool { |
|
156 | - return true; |
|
157 | - } |
|
24 | + use TFileCheck; |
|
25 | + |
|
26 | + /** @var array */ |
|
27 | + protected $fileIds; |
|
28 | + |
|
29 | + /** @var array */ |
|
30 | + protected $fileSystemTags; |
|
31 | + |
|
32 | + public function __construct( |
|
33 | + protected IL10N $l, |
|
34 | + protected ISystemTagManager $systemTagManager, |
|
35 | + protected ISystemTagObjectMapper $systemTagObjectMapper, |
|
36 | + protected IUserSession $userSession, |
|
37 | + protected IGroupManager $groupManager, |
|
38 | + ) { |
|
39 | + } |
|
40 | + |
|
41 | + /** |
|
42 | + * @param string $operator |
|
43 | + * @param string $value |
|
44 | + * @return bool |
|
45 | + */ |
|
46 | + public function executeCheck($operator, $value) { |
|
47 | + $systemTags = $this->getSystemTags(); |
|
48 | + return ($operator === 'is') === in_array($value, $systemTags); |
|
49 | + } |
|
50 | + |
|
51 | + /** |
|
52 | + * @param string $operator |
|
53 | + * @param string $value |
|
54 | + * @throws \UnexpectedValueException |
|
55 | + */ |
|
56 | + public function validateCheck($operator, $value) { |
|
57 | + if (!in_array($operator, ['is', '!is'])) { |
|
58 | + throw new \UnexpectedValueException($this->l->t('The given operator is invalid'), 1); |
|
59 | + } |
|
60 | + |
|
61 | + try { |
|
62 | + $tags = $this->systemTagManager->getTagsByIds($value); |
|
63 | + |
|
64 | + $user = $this->userSession->getUser(); |
|
65 | + $isAdmin = $user instanceof IUser && $this->groupManager->isAdmin($user->getUID()); |
|
66 | + |
|
67 | + if (!$isAdmin) { |
|
68 | + foreach ($tags as $tag) { |
|
69 | + if (!$tag->isUserVisible()) { |
|
70 | + throw new \UnexpectedValueException($this->l->t('The given tag id is invalid'), 4); |
|
71 | + } |
|
72 | + } |
|
73 | + } |
|
74 | + } catch (TagNotFoundException $e) { |
|
75 | + throw new \UnexpectedValueException($this->l->t('The given tag id is invalid'), 2); |
|
76 | + } catch (\InvalidArgumentException $e) { |
|
77 | + throw new \UnexpectedValueException($this->l->t('The given tag id is invalid'), 3); |
|
78 | + } |
|
79 | + } |
|
80 | + |
|
81 | + /** |
|
82 | + * Get the ids of the assigned system tags |
|
83 | + * @return string[] |
|
84 | + */ |
|
85 | + protected function getSystemTags() { |
|
86 | + $cache = $this->storage->getCache(); |
|
87 | + $fileIds = $this->getFileIds($cache, $this->path, !$this->storage->instanceOfStorage(IHomeStorage::class) || $this->storage->instanceOfStorage(SharedStorage::class)); |
|
88 | + |
|
89 | + $systemTags = []; |
|
90 | + foreach ($fileIds as $i => $fileId) { |
|
91 | + if (isset($this->fileSystemTags[$fileId])) { |
|
92 | + $systemTags[] = $this->fileSystemTags[$fileId]; |
|
93 | + unset($fileIds[$i]); |
|
94 | + } |
|
95 | + } |
|
96 | + |
|
97 | + if (!empty($fileIds)) { |
|
98 | + $mappedSystemTags = $this->systemTagObjectMapper->getTagIdsForObjects($fileIds, 'files'); |
|
99 | + foreach ($mappedSystemTags as $fileId => $fileSystemTags) { |
|
100 | + $this->fileSystemTags[$fileId] = $fileSystemTags; |
|
101 | + $systemTags[] = $fileSystemTags; |
|
102 | + } |
|
103 | + } |
|
104 | + |
|
105 | + $systemTags = call_user_func_array('array_merge', $systemTags); |
|
106 | + $systemTags = array_unique($systemTags); |
|
107 | + return $systemTags; |
|
108 | + } |
|
109 | + |
|
110 | + /** |
|
111 | + * Get the file ids of the given path and its parents |
|
112 | + * @param ICache $cache |
|
113 | + * @param string $path |
|
114 | + * @param bool $isExternalStorage |
|
115 | + * @return int[] |
|
116 | + */ |
|
117 | + protected function getFileIds(ICache $cache, $path, $isExternalStorage) { |
|
118 | + $cacheId = $cache->getNumericStorageId(); |
|
119 | + if ($this->storage->instanceOfStorage(Jail::class)) { |
|
120 | + $absolutePath = $this->storage->getUnjailedPath($path); |
|
121 | + } else { |
|
122 | + $absolutePath = $path; |
|
123 | + } |
|
124 | + |
|
125 | + if (isset($this->fileIds[$cacheId][$absolutePath])) { |
|
126 | + return $this->fileIds[$cacheId][$absolutePath]; |
|
127 | + } |
|
128 | + |
|
129 | + $parentIds = []; |
|
130 | + if ($path !== $this->dirname($path)) { |
|
131 | + $parentIds = $this->getFileIds($cache, $this->dirname($path), $isExternalStorage); |
|
132 | + } elseif (!$isExternalStorage) { |
|
133 | + return []; |
|
134 | + } |
|
135 | + |
|
136 | + $fileId = $cache->getId($path); |
|
137 | + if ($fileId !== -1) { |
|
138 | + $parentIds[] = $fileId; |
|
139 | + } |
|
140 | + |
|
141 | + $this->fileIds[$cacheId][$absolutePath] = $parentIds; |
|
142 | + |
|
143 | + return $parentIds; |
|
144 | + } |
|
145 | + |
|
146 | + protected function dirname($path) { |
|
147 | + $dir = dirname($path); |
|
148 | + return $dir === '.' ? '' : $dir; |
|
149 | + } |
|
150 | + |
|
151 | + public function supportedEntities(): array { |
|
152 | + return [ File::class ]; |
|
153 | + } |
|
154 | + |
|
155 | + public function isAvailableForScope(int $scope): bool { |
|
156 | + return true; |
|
157 | + } |
|
158 | 158 | } |
@@ -34,21 +34,21 @@ |
||
34 | 34 | * @since 18.0.0 |
35 | 35 | */ |
36 | 36 | interface IEntityCheck { |
37 | - /** |
|
38 | - * Equips the check with a subject fitting the Entity. For instance, an |
|
39 | - * entity of File will receive an instance of OCP\Files\Node, or a comment |
|
40 | - * entity might get an IComment. |
|
41 | - * |
|
42 | - * The implementing check must be aware of the incoming type. |
|
43 | - * |
|
44 | - * If an unsupported subject is passed the implementation MAY throw an |
|
45 | - * \UnexpectedValueException. |
|
46 | - * |
|
47 | - * @param IEntity $entity |
|
48 | - * @param mixed $subject |
|
49 | - * @throws \UnexpectedValueException |
|
50 | - * @since 18.0.0 |
|
51 | - */ |
|
52 | - public function setEntitySubject(IEntity $entity, $subject): void; |
|
37 | + /** |
|
38 | + * Equips the check with a subject fitting the Entity. For instance, an |
|
39 | + * entity of File will receive an instance of OCP\Files\Node, or a comment |
|
40 | + * entity might get an IComment. |
|
41 | + * |
|
42 | + * The implementing check must be aware of the incoming type. |
|
43 | + * |
|
44 | + * If an unsupported subject is passed the implementation MAY throw an |
|
45 | + * \UnexpectedValueException. |
|
46 | + * |
|
47 | + * @param IEntity $entity |
|
48 | + * @param mixed $subject |
|
49 | + * @throws \UnexpectedValueException |
|
50 | + * @since 18.0.0 |
|
51 | + */ |
|
52 | + public function setEntitySubject(IEntity $entity, $subject): void; |
|
53 | 53 | |
54 | 54 | } |
@@ -31,43 +31,43 @@ |
||
31 | 31 | * @since 9.1 |
32 | 32 | */ |
33 | 33 | interface ICheck { |
34 | - /** |
|
35 | - * @param string $operator |
|
36 | - * @param string $value |
|
37 | - * @return bool |
|
38 | - * @since 9.1 |
|
39 | - */ |
|
40 | - public function executeCheck($operator, $value); |
|
34 | + /** |
|
35 | + * @param string $operator |
|
36 | + * @param string $value |
|
37 | + * @return bool |
|
38 | + * @since 9.1 |
|
39 | + */ |
|
40 | + public function executeCheck($operator, $value); |
|
41 | 41 | |
42 | - /** |
|
43 | - * @param string $operator |
|
44 | - * @param string $value |
|
45 | - * @throws \UnexpectedValueException |
|
46 | - * @since 9.1 |
|
47 | - */ |
|
48 | - public function validateCheck($operator, $value); |
|
42 | + /** |
|
43 | + * @param string $operator |
|
44 | + * @param string $value |
|
45 | + * @throws \UnexpectedValueException |
|
46 | + * @since 9.1 |
|
47 | + */ |
|
48 | + public function validateCheck($operator, $value); |
|
49 | 49 | |
50 | - /** |
|
51 | - * returns a list of Entities the checker supports. The values must match |
|
52 | - * the class name of the entity. |
|
53 | - * |
|
54 | - * An empty result means the check is universally available. |
|
55 | - * |
|
56 | - * @since 18.0.0 |
|
57 | - */ |
|
58 | - public function supportedEntities(): array; |
|
50 | + /** |
|
51 | + * returns a list of Entities the checker supports. The values must match |
|
52 | + * the class name of the entity. |
|
53 | + * |
|
54 | + * An empty result means the check is universally available. |
|
55 | + * |
|
56 | + * @since 18.0.0 |
|
57 | + */ |
|
58 | + public function supportedEntities(): array; |
|
59 | 59 | |
60 | - /** |
|
61 | - * returns whether the operation can be used in the requested scope. |
|
62 | - * |
|
63 | - * Scope IDs are defined as constants in OCP\WorkflowEngine\IManager. At |
|
64 | - * time of writing these are SCOPE_ADMIN and SCOPE_USER. |
|
65 | - * |
|
66 | - * For possibly unknown future scopes the recommended behaviour is: if |
|
67 | - * user scope is permitted, the default behaviour should return `true`, |
|
68 | - * otherwise `false`. |
|
69 | - * |
|
70 | - * @since 18.0.0 |
|
71 | - */ |
|
72 | - public function isAvailableForScope(int $scope): bool; |
|
60 | + /** |
|
61 | + * returns whether the operation can be used in the requested scope. |
|
62 | + * |
|
63 | + * Scope IDs are defined as constants in OCP\WorkflowEngine\IManager. At |
|
64 | + * time of writing these are SCOPE_ADMIN and SCOPE_USER. |
|
65 | + * |
|
66 | + * For possibly unknown future scopes the recommended behaviour is: if |
|
67 | + * user scope is permitted, the default behaviour should return `true`, |
|
68 | + * otherwise `false`. |
|
69 | + * |
|
70 | + * @since 18.0.0 |
|
71 | + */ |
|
72 | + public function isAvailableForScope(int $scope): bool; |
|
73 | 73 | } |
@@ -34,21 +34,21 @@ |
||
34 | 34 | * @since 18.0.0 |
35 | 35 | */ |
36 | 36 | interface IEntityEvent { |
37 | - /** |
|
38 | - * returns a translated name to be presented in the web interface. |
|
39 | - * |
|
40 | - * Example: "created" (en), "kreita" (eo) |
|
41 | - * |
|
42 | - * @since 18.0.0 |
|
43 | - */ |
|
44 | - public function getDisplayName(): string; |
|
37 | + /** |
|
38 | + * returns a translated name to be presented in the web interface. |
|
39 | + * |
|
40 | + * Example: "created" (en), "kreita" (eo) |
|
41 | + * |
|
42 | + * @since 18.0.0 |
|
43 | + */ |
|
44 | + public function getDisplayName(): string; |
|
45 | 45 | |
46 | - /** |
|
47 | - * returns the event name that is emitted by the EventDispatcher, e.g.: |
|
48 | - * |
|
49 | - * Example: "OCA\MyApp\Factory\Cats::postCreated" |
|
50 | - * |
|
51 | - * @since 18.0.0 |
|
52 | - */ |
|
53 | - public function getEventName(): string; |
|
46 | + /** |
|
47 | + * returns the event name that is emitted by the EventDispatcher, e.g.: |
|
48 | + * |
|
49 | + * Example: "OCA\MyApp\Factory\Cats::postCreated" |
|
50 | + * |
|
51 | + * @since 18.0.0 |
|
52 | + */ |
|
53 | + public function getEventName(): string; |
|
54 | 54 | } |