Remove unused static methods in LanguageConverter subclasses
It seems LanguageConverter::parseManualRule was removed by69dbeb97f1(2008), and LanguageConverter::parserConvert byc568220e61(2010), so it seems safe and reasonable to remove their implementations from few remaining language-specific Converter classes. Change-Id: I7092f5c8856723fabd2b1f99944451344feb5711
This commit is contained in:
parent
daba6753d1
commit
cb4bb23df6
5 changed files with 1 additions and 127 deletions
|
|
@ -96,44 +96,6 @@ class IuConverter extends LanguageConverter {
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* rules should be defined as -{Syllabic | Latin-} -or-
|
||||
* -{code:text | code:text | ...}-
|
||||
* update: delete all rule parsing because it's not used
|
||||
* currently, and just produces a couple of bugs
|
||||
*
|
||||
* @param string $rule
|
||||
* @param array $flags
|
||||
* @return array
|
||||
*/
|
||||
function parseManualRule( $rule, $flags = [] ) {
|
||||
if ( in_array( 'T', $flags ) ) {
|
||||
return parent::parseManualRule( $rule, $flags );
|
||||
}
|
||||
|
||||
$carray = [];
|
||||
// otherwise ignore all formatting
|
||||
foreach ( $this->mVariants as $v ) {
|
||||
$carray[$v] = $rule;
|
||||
}
|
||||
|
||||
return $carray;
|
||||
}
|
||||
|
||||
/**
|
||||
* Do not convert content on talk pages
|
||||
*
|
||||
* @param string $text
|
||||
* @param Parser $parser
|
||||
* @return string
|
||||
*/
|
||||
function parserConvert( $text, &$parser ) {
|
||||
$this->mDoContentConvert = !( is_object( $parser->getTitle() )
|
||||
&& $parser->getTitle()->isTalkPage() );
|
||||
|
||||
return parent::parserConvert( $text, $parser );
|
||||
}
|
||||
|
||||
/**
|
||||
* A function wrapper:
|
||||
* - if there is no selected variant, leave the link
|
||||
|
|
|
|||
|
|
@ -216,31 +216,6 @@ class KkConverter extends LanguageConverter {
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* rules should be defined as -{ekavian | iyekavian-} -or-
|
||||
* -{code:text | code:text | ...}-
|
||||
*
|
||||
* update: delete all rule parsing because it's not used
|
||||
* currently, and just produces a couple of bugs
|
||||
*
|
||||
* @param string $rule
|
||||
* @param array $flags
|
||||
* @return array
|
||||
*/
|
||||
function parseManualRule( $rule, $flags = [] ) {
|
||||
if ( in_array( 'T', $flags ) ) {
|
||||
return parent::parseManualRule( $rule, $flags );
|
||||
}
|
||||
|
||||
$carray = [];
|
||||
// otherwise ignore all formatting
|
||||
foreach ( $this->mVariants as $v ) {
|
||||
$carray[$v] = $rule;
|
||||
}
|
||||
|
||||
return $carray;
|
||||
}
|
||||
|
||||
/**
|
||||
* A function wrapper:
|
||||
* - if there is no selected variant, leave the link
|
||||
|
|
|
|||
|
|
@ -72,44 +72,6 @@ class ShiConverter extends LanguageConverter {
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* rules should be defined as -{Tifinagh | Latin-} -or-
|
||||
* -{code:text | code:text | ...}-
|
||||
* update: delete all rule parsing because it's not used
|
||||
* currently, and just produces a couple of bugs
|
||||
*
|
||||
* @param string $rule
|
||||
* @param array $flags
|
||||
* @return array
|
||||
*/
|
||||
function parseManualRule( $rule, $flags = [] ) {
|
||||
if ( in_array( 'T', $flags ) ) {
|
||||
return parent::parseManualRule( $rule, $flags );
|
||||
}
|
||||
|
||||
$carray = [];
|
||||
// otherwise ignore all formatting
|
||||
foreach ( $this->mVariants as $v ) {
|
||||
$carray[$v] = $rule;
|
||||
}
|
||||
|
||||
return $carray;
|
||||
}
|
||||
|
||||
/**
|
||||
* Do not convert content on talk pages
|
||||
*
|
||||
* @param string $text
|
||||
* @param Parser $parser
|
||||
* @return string
|
||||
*/
|
||||
function parserConvert( $text, &$parser ) {
|
||||
$this->mDoContentConvert = !( is_object( $parser->getTitle() )
|
||||
&& $parser->getTitle()->isTalkPage() );
|
||||
|
||||
return parent::parserConvert( $text, $parser );
|
||||
}
|
||||
|
||||
/**
|
||||
* A function wrapper:
|
||||
* - if there is no selected variant, leave the link
|
||||
|
|
|
|||
|
|
@ -75,31 +75,6 @@ class SrConverter extends LanguageConverter {
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* rules should be defined as -{ekavian | iyekavian-} -or-
|
||||
* -{code:text | code:text | ...}-
|
||||
*
|
||||
* update: delete all rule parsing because it's not used
|
||||
* currently, and just produces a couple of bugs
|
||||
*
|
||||
* @param string $rule
|
||||
* @param array $flags
|
||||
* @return array
|
||||
*/
|
||||
function parseManualRule( $rule, $flags = [] ) {
|
||||
if ( in_array( 'T', $flags ) ) {
|
||||
return parent::parseManualRule( $rule, $flags );
|
||||
}
|
||||
|
||||
$carray = [];
|
||||
// otherwise ignore all formatting
|
||||
foreach ( $this->mVariants as $v ) {
|
||||
$carray[$v] = $rule;
|
||||
}
|
||||
|
||||
return $carray;
|
||||
}
|
||||
|
||||
/**
|
||||
* A function wrapper:
|
||||
* - if there is no selected variant, leave the link
|
||||
|
|
|
|||
|
|
@ -337,7 +337,7 @@ return [
|
|||
"PhanUndeclaredMethod",
|
||||
// approximate error count: 1342
|
||||
"PhanUndeclaredProperty",
|
||||
// approximate error count: 9
|
||||
// approximate error count: 3
|
||||
"PhanUndeclaredStaticMethod",
|
||||
// approximate error count: 79
|
||||
"PhanUndeclaredVariable",
|
||||
|
|
|
|||
Loading…
Reference in a new issue