From 0f0b6ad794fa505ec2370b975eac41e97422e362 Mon Sep 17 00:00:00 2001 From: mjansen Date: Fri, 17 Apr 2026 12:28:36 +0200 Subject: [PATCH] [IMPROVEMENT] User: Improve PHP types in `User/Search` This PR improves the type documentation in the `Search` sub-namespace of the "User" component. --- components/ILIAS/User/src/Search/AutocompleteItem.php | 6 ++++-- .../ILIAS/User/src/Search/DefaultEndpointConfigurator.php | 6 ++---- components/ILIAS/User/src/Search/EndpointConfigurator.php | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/components/ILIAS/User/src/Search/AutocompleteItem.php b/components/ILIAS/User/src/Search/AutocompleteItem.php index d3b7a56d59ca..c9a8bc97af9d 100644 --- a/components/ILIAS/User/src/Search/AutocompleteItem.php +++ b/components/ILIAS/User/src/Search/AutocompleteItem.php @@ -28,8 +28,10 @@ interface AutocompleteItem * The returned tags will then again be filtered by the value in the property * "searchBy". If you need to show the tag even if you are not allowed to * divulge the full value of the field the search string was found in, you - * can simply reuse the search term here. See the - * `\ILIAS\User\Search\DefaultAutocompleteItem for an implementation of this. + * can simply reuse the search term here. See the {@see DefaultAutocompleteItem} + * for an implementation of this. + * + * @return array{value: string, display: string, searchBy: string} */ public function getTagArray(): array; } diff --git a/components/ILIAS/User/src/Search/DefaultEndpointConfigurator.php b/components/ILIAS/User/src/Search/DefaultEndpointConfigurator.php index 1ac39107728e..a60c141c63d5 100644 --- a/components/ILIAS/User/src/Search/DefaultEndpointConfigurator.php +++ b/components/ILIAS/User/src/Search/DefaultEndpointConfigurator.php @@ -20,12 +20,10 @@ namespace ILIAS\User\Search; -class DefaultEndpointConfigurator implements EndpointConfigurator +readonly class DefaultEndpointConfigurator implements EndpointConfigurator { /** - * - * @param list $parent_class_path see: - * `\ILIAS\User\Search\EndpointConfigurator::getParentClassPath()` + * @param list $parent_class_path like in {@see EndpointConfigurator::getParentClassPath()} */ public function __construct( private array $parent_class_path diff --git a/components/ILIAS/User/src/Search/EndpointConfigurator.php b/components/ILIAS/User/src/Search/EndpointConfigurator.php index 5e68ab6c25e8..8f631714da36 100644 --- a/components/ILIAS/User/src/Search/EndpointConfigurator.php +++ b/components/ILIAS/User/src/Search/EndpointConfigurator.php @@ -24,13 +24,13 @@ interface EndpointConfigurator { /** * @return list MUST return an array containing all class names in - * the path to be prepended to the EndpointGUI in order to build the URL - * with `ilCtrl` + * the path to be prepended to the EndpointGUI to build the URL + * with {@see \ilCtrlInterface} */ public function getParentClassPath(): array; /** - * @return list<\ILIAS\User\Search\AutocompleteItem> Items that should be + * @return list Items that should be * added to the list the user can select from. */ public function getAdditionalAnswerElements(