Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 6
KuConverter
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 2
20
0.00% covered (danger)
0.00%
0 / 6
 loadDefaultTables
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 2
 findVariantLink
0.00% covered (danger)
0.00%
0 / 1
12
0.00% covered (danger)
0.00%
0 / 4
<?php
declare( strict_types = 1 );
namespace Wikimedia\Parsoid\Language;
use Wikimedia\LangConv\FstReplacementMachine;
class KuConverter extends LanguageConverter {
    public function loadDefaultTables() {
        $this->setMachine( new FstReplacementMachine( 'ku', [ 'ku-arab', 'ku-latn' ] ) );
    }
    // phpcs:ignore MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic
    public function findVariantLink( $link, $nt, $ignoreOtherCond ) {
        $ns = $nt->getNamespace();
        // do not try to find variants for usernames
        if ( $ns->isUser() || $ns->isUserTalk ) {
            return [ 'nt' => $nt, 'link' => $link ];
        }
        // FIXME check whether selected language is 'ku'
        return parent::findVariantLink( $link, $nt, $ignoreOtherCond );
    }
}