aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/App
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/App')
-rw-r--r--lib/public/App/IAppManager.php7
-rw-r--r--lib/public/App/ManagerEvent.php21
2 files changed, 12 insertions, 16 deletions
diff --git a/lib/public/App/IAppManager.php b/lib/public/App/IAppManager.php
index f7c9d848099..764b3b0a5b5 100644
--- a/lib/public/App/IAppManager.php
+++ b/lib/public/App/IAppManager.php
@@ -42,7 +42,6 @@ use OCP\IUser;
* @since 8.0.0
*/
interface IAppManager {
-
/**
* Returns the app information from "appinfo/info.xml".
*
@@ -117,7 +116,7 @@ interface IAppManager {
* Enable an app only for specific groups
*
* @param string $appId
- * @param \OCP\IGroup[] $groups
+ * @param string[] $groups
* @param bool $forceEnable
* @throws \Exception
* @since 8.0.0
@@ -197,13 +196,13 @@ interface IAppManager {
/**
* @param \OCP\IGroup $group
- * @return String[]
+ * @return string[]
* @since 17.0.0
*/
public function getEnabledAppsForGroup(IGroup $group): array;
/**
- * @param String $appId
+ * @param string $appId
* @return string[]
* @since 17.0.0
*/
diff --git a/lib/public/App/ManagerEvent.php b/lib/public/App/ManagerEvent.php
index 0069e57db42..9f2ef58b21d 100644
--- a/lib/public/App/ManagerEvent.php
+++ b/lib/public/App/ManagerEvent.php
@@ -53,21 +53,21 @@ class ManagerEvent extends Event {
public const EVENT_APP_UPDATE = 'OCP\App\IAppManager::updateApp';
/** @var string */
- protected $event;
+ protected string $event;
/** @var string */
- protected $appID;
- /** @var \OCP\IGroup[]|null */
- protected $groups;
+ protected string $appID;
+ /** @var string[]|null */
+ protected ?array $groups;
/**
* DispatcherEvent constructor.
*
* @param string $event
- * @param $appID
- * @param \OCP\IGroup[]|null $groups
+ * @param string $appID
+ * @param string[]|null $groups
* @since 9.0.0
*/
- public function __construct($event, $appID, array $groups = null) {
+ public function __construct($event, $appID, ?array $groups = null) {
$this->event = $event;
$this->appID = $appID;
$this->groups = $groups;
@@ -91,13 +91,10 @@ class ManagerEvent extends Event {
/**
* returns the group Ids
- * @return string[]
+ * @return string[]|null
* @since 9.0.0
*/
public function getGroups() {
- return array_map(function ($group) {
- /** @var \OCP\IGroup $group */
- return $group->getGID();
- }, $this->groups);
+ return $this->groups;
}
}