]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use more explicit naming for profile link action 29435/head
authorChristopher Ng <chrng8@gmail.com>
Mon, 25 Oct 2021 22:20:19 +0000 (22:20 +0000)
committerChristopher Ng <chrng8@gmail.com>
Mon, 25 Oct 2021 22:20:19 +0000 (22:20 +0000)
Signed-off-by: Christopher Ng <chrng8@gmail.com>
lib/private/AppFramework/Bootstrap/RegistrationContext.php
lib/private/Profile/ProfileManager.php
lib/public/AppFramework/Bootstrap/IRegistrationContext.php

index 256d3e2346ba9d06d0a7b8e2648e023f65767c2a..6a9073b576bccdc02a826e9821640b4fa2ba1d99 100644 (file)
@@ -63,7 +63,7 @@ class RegistrationContext {
        private $dashboardPanels = [];
 
        /** @var ServiceRegistration<ILinkAction>[] */
-       private $profileActions = [];
+       private $profileLinkActions = [];
 
        /** @var ServiceFactoryRegistration[] */
        private $services = [];
@@ -253,8 +253,8 @@ class RegistrationContext {
                                );
                        }
 
-                       public function registerProfileAction(string $actionClass): void {
-                               $this->context->registerProfileAction(
+                       public function registerProfileLinkAction(string $actionClass): void {
+                               $this->context->registerProfileLinkAction(
                                        $this->appId,
                                        $actionClass
                                );
@@ -343,10 +343,10 @@ class RegistrationContext {
        }
 
        /**
-        * @psalm-param class-string<ILinkAction> $capability
+        * @psalm-param class-string<ILinkAction> $actionClass
         */
-       public function registerProfileAction(string $appId, string $actionClass): void {
-               $this->profileActions[] = new ServiceRegistration($appId, $actionClass);
+       public function registerProfileLinkAction(string $appId, string $actionClass): void {
+               $this->profileLinkActions[] = new ServiceRegistration($appId, $actionClass);
        }
 
        /**
@@ -597,7 +597,7 @@ class RegistrationContext {
        /**
         * @return ServiceRegistration<ILinkAction>[]
         */
-       public function getProfileActions(): array {
-               return $this->profileActions;
+       public function getProfileLinkActions(): array {
+               return $this->profileLinkActions;
        }
 }
index e0c619725e7cf638ec098622a0da29467713dad0..bf974e98e0ff41fd53584f95bdf7a5bdd3693743 100644 (file)
@@ -168,7 +168,7 @@ class ProfileManager {
                        $this->registerAction($targetUser, $visitingUser, $provider);
                }
 
-               foreach ($context->getProfileActions() as $registration) {
+               foreach ($context->getProfileLinkActions() as $registration) {
                        /** @var ILinkAction $provider */
                        $provider = $this->container->get($registration->getService());
                        $this->registerAction($targetUser, $visitingUser, $provider);
index de391050ec140bcbe49114efb1e50a592cf41609..3e5aef06e8b0bab72fc4135e9eed4b434c0e8e6f 100644 (file)
@@ -255,12 +255,12 @@ interface IRegistrationContext {
 
        /**
         * Register an implementation of \OCP\Profile\ILinkAction that
-        * will handle the implementation of a profile action
+        * will handle the implementation of a profile link action
         *
         * @param string $actionClass
         * @psalm-param class-string<\OCP\Profile\ILinkAction> $actionClass
         * @return void
         * @since 23.0.0
         */
-       public function registerProfileAction(string $actionClass): void;
+       public function registerProfileLinkAction(string $actionClass): void;
 }