feat(ocp): More specific type for ICapabilities::getCapabilities

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
pull/39057/head
Christoph Wurst 1 year ago
parent 5d9d37e2c5
commit 95145ee0c9
No known key found for this signature in database
GPG Key ID: CC42AC2A7F0E56D8
  1. 3
      apps/cloud_federation_api/lib/Capabilities.php
  2. 2
      apps/files/lib/Capabilities.php
  3. 2
      apps/files_sharing/lib/Capabilities.php
  4. 2
      apps/files_trashbin/lib/Capabilities.php
  5. 2
      apps/files_versions/lib/Capabilities.php
  6. 2
      apps/provisioning_api/lib/Capabilities.php
  7. 2
      apps/theming/lib/Capabilities.php
  8. 3
      apps/user_status/lib/Capabilities.php
  9. 3
      apps/weather_status/lib/Capabilities.php
  10. 2
      lib/private/OCS/CoreCapabilities.php
  11. 14
      lib/public/Capabilities/ICapability.php

@ -36,9 +36,6 @@ class Capabilities implements ICapability {
/** /**
* Function an app uses to return the capabilities * Function an app uses to return the capabilities
*
* @return array Array containing the apps capabilities
* @since 8.2.0
*/ */
public function getCapabilities() { public function getCapabilities() {
$url = $this->urlGenerator->linkToRouteAbsolute('cloud_federation_api.requesthandlercontroller.addShare'); $url = $this->urlGenerator->linkToRouteAbsolute('cloud_federation_api.requesthandlercontroller.addShare');

@ -38,8 +38,6 @@ class Capabilities implements ICapability {
/** /**
* Return this classes capabilities * Return this classes capabilities
*
* @return array
*/ */
public function getCapabilities() { public function getCapabilities() {
return [ return [

@ -50,8 +50,6 @@ class Capabilities implements ICapability {
/** /**
* Return this classes capabilities * Return this classes capabilities
*
* @return array
*/ */
public function getCapabilities() { public function getCapabilities() {
$res = []; $res = [];

@ -33,8 +33,6 @@ class Capabilities implements ICapability {
/** /**
* Return this classes capabilities * Return this classes capabilities
*
* @return array
*/ */
public function getCapabilities() { public function getCapabilities() {
return [ return [

@ -42,8 +42,6 @@ class Capabilities implements ICapability {
/** /**
* Return this classes capabilities * Return this classes capabilities
*
* @return array
*/ */
public function getCapabilities() { public function getCapabilities() {
$groupFolderInstalled = $this->appManager->isInstalled('groupfolders'); $groupFolderInstalled = $this->appManager->isInstalled('groupfolders');

@ -37,8 +37,6 @@ class Capabilities implements ICapability {
/** /**
* Function an app uses to return the capabilities * Function an app uses to return the capabilities
*
* @return array Array containing the apps capabilities
*/ */
public function getCapabilities() { public function getCapabilities() {
$federatedScopeEnabled = $this->appManager->isEnabledForUser('federation'); $federatedScopeEnabled = $this->appManager->isEnabledForUser('federation');

@ -64,8 +64,6 @@ class Capabilities implements IPublicCapability {
/** /**
* Return this classes capabilities * Return this classes capabilities
*
* @return array
*/ */
public function getCapabilities() { public function getCapabilities() {
$backgroundLogo = $this->config->getAppValue('theming', 'backgroundMime', ''); $backgroundLogo = $this->config->getAppValue('theming', 'backgroundMime', '');

@ -40,9 +40,6 @@ class Capabilities implements ICapability {
$this->emojiHelper = $emojiHelper; $this->emojiHelper = $emojiHelper;
} }
/**
* @inheritDoc
*/
public function getCapabilities() { public function getCapabilities() {
return [ return [
'user_status' => [ 'user_status' => [

@ -43,9 +43,6 @@ class Capabilities implements ICapability {
public function __construct() { public function __construct() {
} }
/**
* @inheritDoc
*/
public function getCapabilities() { public function getCapabilities() {
return [ return [
Application::APP_ID => [ Application::APP_ID => [

@ -44,8 +44,6 @@ class CoreCapabilities implements ICapability {
/** /**
* Return this classes capabilities * Return this classes capabilities
*
* @return array
*/ */
public function getCapabilities() { public function getCapabilities() {
return [ return [

@ -37,7 +37,19 @@ interface ICapability {
/** /**
* Function an app uses to return the capabilities * Function an app uses to return the capabilities
* *
* @return array Array containing the apps capabilities * ```php
* return [
* 'myapp' => [
* 'awesomefeature' => true,
* 'featureversion' => 3,
* ],
* 'morecomplex' => [
* 'a' => [1, 2],
* ],
* ];
* ```
*
* @return array<string, array<string, mixed>> Indexed array containing the app's capabilities
* @since 8.2.0 * @since 8.2.0
*/ */
public function getCapabilities(); public function getCapabilities();

Loading…
Cancel
Save