X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=languages%2FConverterRule.php;h=8be2d6aed0b697a3d86ac20ea301d751db0962e4;hb=395ab24a56dcd9fb617185242c921d3f7716e3e2;hp=dc61519c6928bf45718055f42139e6d4136bb9a6;hpb=e143c40fee88922eb393a88f94e60afc439d1f49;p=lhc%2Fweb%2Fwiklou.git diff --git a/languages/ConverterRule.php b/languages/ConverterRule.php index dc61519c69..8be2d6aed0 100644 --- a/languages/ConverterRule.php +++ b/languages/ConverterRule.php @@ -20,7 +20,7 @@ */ /** - * Parser for rules of language conversion , parse rules in -{ }- tag. + * Parser for rules of language conversion, parse rules in -{ }- tag. * @ingroup Language * @author fdcn , PhiLiP */ @@ -29,13 +29,13 @@ class ConverterRule { public $mConverter; // LanguageConverter object public $mRuleDisplay = ''; public $mRuleTitle = false; - public $mRules = '';// string : the text of the rules + public $mRules = ''; // string : the text of the rules public $mRulesAction = 'none'; public $mFlags = []; public $mVariantFlags = []; public $mConvTable = []; - public $mBidtable = [];// array of the translation in each variant - public $mUnidtable = [];// array of the translation in each variant + public $mBidtable = []; // array of the translation in each variant + public $mUnidtable = []; // array of the translation in each variant /** * @param string $text The text between -{ and }- @@ -399,11 +399,7 @@ class ConverterRule { case 'N': // process N flag: output current variant name $ruleVar = trim( $rules ); - if ( isset( $this->mConverter->mVariantNames[$ruleVar] ) ) { - $this->mRuleDisplay = $this->mConverter->mVariantNames[$ruleVar]; - } else { - $this->mRuleDisplay = ''; - } + $this->mRuleDisplay = $this->mConverter->mVariantNames[$ruleVar] ?? ''; break; case 'D': // process D flag: output rules description