Skip to content

Commit

Permalink
Merge pull request #145 from Wikidata-lib/builderDocs
Browse files Browse the repository at this point in the history
Fix PHPDocs in ResultBuilder
  • Loading branch information
JeroenDeDauw committed Sep 3, 2015
2 parents fe28fe5 + a9e7804 commit 1106790
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/PropertySuggester/ResultBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class ResultBuilder {

/**
* @var $EntityTitleLookup
* @var EntityTitleLookup
*/
private $entityTitleLookup;

Expand Down Expand Up @@ -94,13 +94,14 @@ private function buildEntry( EntityId $id, array $clusteredTerms, Suggestion $su
$entry['url'] = $this->entityTitleLookup->getTitleForId( $id )->getFullUrl();
$entry['rating'] = $suggestion->getProbability();

/** @var TermIndexEntry[] $matchingTerms */
if ( isset( $clusteredTerms[$id->getSerialization()] ) ) {
$matchingTerms = $clusteredTerms[$id->getSerialization()];
} else {
$matchingTerms = array();
}

foreach ( $matchingTerms as $term ) {
/** @var $term TermIndexEntry */
switch ( $term->getType() ) {
case TermIndexEntry::TYPE_LABEL:
$entry['label'] = $term->getText();
Expand Down

0 comments on commit 1106790

Please sign in to comment.