diff --git a/src/PropertySuggester/ResultBuilder.php b/src/PropertySuggester/ResultBuilder.php index cf2dc16..68c7071 100644 --- a/src/PropertySuggester/ResultBuilder.php +++ b/src/PropertySuggester/ResultBuilder.php @@ -53,7 +53,7 @@ public function __construct( ApiResult $result, TermIndex $termIndex, EntityTitl /** * @param Suggestion[] $suggestions * @param string $language - * @return array + * @return array[] */ public function createResultArray( array $suggestions, $language ) { $entries = array(); @@ -79,13 +79,13 @@ public function createResultArray( array $suggestions, $language ) { /** * @param EntityId $id - * @param array $clusteredTerms + * @param array[] $clusteredTerms * @param Suggestion $suggestion - * @return array $entry + * @return array */ private function buildEntry( EntityId $id, array $clusteredTerms, Suggestion $suggestion ) { $entry = array(); - $entry['id'] = $id->getPrefixedId(); + $entry['id'] = $id->getSerialization(); $entry['url'] = $this->entityTitleLookup->getTitleForId( $id )->getFullUrl(); $entry['rating'] = $suggestion->getProbability(); @@ -146,10 +146,10 @@ private function checkAndSetAlias( array &$entry, Term $term ) { } /** - * @param array $entries - * @param array $searchResults + * @param array[] $entries + * @param array[] $searchResults * @param int $resultSize - * @return array representing Json + * @return array[] representing Json */ public function mergeWithTraditionalSearchResults( array &$entries, array $searchResults, $resultSize ) { // Avoid duplicates