jenkins-bot has submitted this change and it was merged. Change subject: Cleanup annotations and signatures in CirrusSearch\LanguageDetect ......................................................................
Cleanup annotations and signatures in CirrusSearch\LanguageDetect Bug: T132625 Change-Id: I4a45e151a364be59c375afd8f55f48560920b11b --- M includes/LanguageDetector/ElasticSearch.php M includes/LanguageDetector/HttpAccept.php M includes/LanguageDetector/TextCat.php 3 files changed, 16 insertions(+), 8 deletions(-) Approvals: MaxSem: Looks good to me, approved DCausse: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/includes/LanguageDetector/ElasticSearch.php b/includes/LanguageDetector/ElasticSearch.php index e4c5e27..7d3759f 100644 --- a/includes/LanguageDetector/ElasticSearch.php +++ b/includes/LanguageDetector/ElasticSearch.php @@ -11,8 +11,11 @@ * See: https://github.com/jprante/elasticsearch-langdetect */ class ElasticSearch implements Detector { - /* (non-PHPdoc) - * @see \CirrusSearch\LanguageDetector\Detector::detect() + /** + * Detect language + * @param CirrusSearch $cirrus Searching class + * @param string $text Text to detect language + * @return string|null Preferred language, or null if none found */ public function detect( CirrusSearch $cirrus, $text ) { $client = $cirrus->getConnection()->getClient(); diff --git a/includes/LanguageDetector/HttpAccept.php b/includes/LanguageDetector/HttpAccept.php index 22a4358..ad4dbc2 100644 --- a/includes/LanguageDetector/HttpAccept.php +++ b/includes/LanguageDetector/HttpAccept.php @@ -21,14 +21,16 @@ */ protected $httpLang; - public function __construct() - { + public function __construct() { $this->wikiLang = $GLOBALS['wgContLang']->getCode(); $this->httpLang = array_keys( $GLOBALS['wgRequest']->getAcceptLang() ); } - /* (non-PHPdoc) - * @see \CirrusSearch\LanguageDetector\Detector::detect() + /** + * Detect language + * @param CirrusSearch $cirrus Searching class + * @param string $text Text to detect language + * @return string|null Preferred language, or null if none found */ public function detect( CirrusSearch $cirrus, $text ) { foreach ( $this->httpLang as $lang ) { diff --git a/includes/LanguageDetector/TextCat.php b/includes/LanguageDetector/TextCat.php index 2772382..7dc4e99 100644 --- a/includes/LanguageDetector/TextCat.php +++ b/includes/LanguageDetector/TextCat.php @@ -8,8 +8,11 @@ * Try to detect language with TextCat text categorizer */ class TextCat implements Detector { - /* (non-PHPdoc) - * @see \CirrusSearch\LanguageDetector\Detector::detect() + /** + * Detect language + * @param CirrusSearch $cirrus Searching class + * @param string $text Text to detect language + * @return string|null Preferred language, or null if none found */ public function detect( CirrusSearch $cirrus, $text ) { $config = $cirrus->getConfig(); -- To view, visit https://gerrit.wikimedia.org/r/283355 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4a45e151a364be59c375afd8f55f48560920b11b Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: EBernhardson <[email protected]> Gerrit-Reviewer: DCausse <[email protected]> Gerrit-Reviewer: Gehel <[email protected]> Gerrit-Reviewer: Manybubbles <[email protected]> Gerrit-Reviewer: MaxSem <[email protected]> Gerrit-Reviewer: Smalyshev <[email protected]> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
