/** * Create suggestion from text * Will also create a title if text if not empty. * @param float $score Suggestions score * @param string $text * @return SearchSuggestion */ public static function fromText($score, $text) { $suggestion = new self($score, $text); if ($text) { $suggestion->setSuggestedTitle(Title::makeTitle(0, $text)); } return $suggestion; }