From 31df3028c8b6ebe2baa3a2dfe1152a21355c9eaa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 28 Nov 2022 10:53:19 +0100 Subject: [PATCH] Use array-shape as the return type for ISearchEngine::getInnerJoin() --- .../search/IContextAwareSearchEngine.class.php | 12 ++++++------ .../lib/system/search/ISearchEngine.class.php | 14 ++++++-------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/wcfsetup/install/files/lib/system/search/IContextAwareSearchEngine.class.php b/wcfsetup/install/files/lib/system/search/IContextAwareSearchEngine.class.php index 86386166c9..12fd63339b 100644 --- a/wcfsetup/install/files/lib/system/search/IContextAwareSearchEngine.class.php +++ b/wcfsetup/install/files/lib/system/search/IContextAwareSearchEngine.class.php @@ -25,13 +25,13 @@ interface IContextAwareSearchEngine extends ISearchEngine /** * Returns the inner join query and the condition parameters. This method is allowed to return NULL for both the - * 'fulltextCondition' and 'searchIndexCondition' index instead of a PreparedStatementConditionBuilder instance: + * 'fulltextCondition' and 'searchIndexCondition' index instead of a PreparedStatementConditionBuilder instance. * - * array( - * 'fulltextCondition' => $fulltextCondition || null, - * 'searchIndexCondition' => $searchIndexCondition || null, - * 'sql' => $sql - * ); + * @return array{ + * fulltextCondition: ?PreparedStatementConditionBuilder + * searchIndexCondition: ?PreparedStatementConditionBuilder + * sql: string + * } */ public function getInnerJoinWithContext( string $objectTypeName, diff --git a/wcfsetup/install/files/lib/system/search/ISearchEngine.class.php b/wcfsetup/install/files/lib/system/search/ISearchEngine.class.php index 8fc6a28024..13b8d93f6c 100644 --- a/wcfsetup/install/files/lib/system/search/ISearchEngine.class.php +++ b/wcfsetup/install/files/lib/system/search/ISearchEngine.class.php @@ -23,13 +23,7 @@ interface ISearchEngine /** * Returns the inner join query and the condition parameters. This method is allowed to return NULL for both the - * 'fulltextCondition' and 'searchIndexCondition' index instead of a PreparedStatementConditionBuilder instance: - * - * array( - * 'fulltextCondition' => $fulltextCondition || null, - * 'searchIndexCondition' => $searchIndexCondition || null, - * 'sql' => $sql - * ); + * 'fulltextCondition' and 'searchIndexCondition' index instead of a PreparedStatementConditionBuilder instance. * * @param string $objectTypeName * @param string $q @@ -37,7 +31,11 @@ interface ISearchEngine * @param PreparedStatementConditionBuilder $searchIndexCondition * @param string $orderBy * @param int $limit - * @return array + * @return array{ + * fulltextCondition: ?PreparedStatementConditionBuilder + * searchIndexCondition: ?PreparedStatementConditionBuilder + * sql: string + * } */ public function getInnerJoin( $objectTypeName, -- 2.20.1