Showing 994 of 1,238 total issues
Method fetchTranslatableTemplateAndTitle
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function fetchTranslatableTemplateAndTitle(
?LinkTarget $contextLink,
?LinkTarget $templateLink,
bool &$skip,
?RevisionRecord &$revRecord
Method sourcePageHeader
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function sourcePageHeader( IContextSource $context ) {
$linker = MediaWikiServices::getInstance()->getLinkRenderer();
$language = $context->getLanguage();
$title = $context->getTitle();
Method processGroups
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function processGroups( array $groups ): array {
$fixedGroups = [];
foreach ( $groups as $g ) {
$name = $g['name'];
$sanitizedName = preg_replace( '/\s+/', '', strtolower( $name ) );
Method beginBootstrap
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function beginBootstrap(): void {
$this->checkElasticsearchVersion();
$index = $this->getIndex();
if ( $this->updateMapping ) {
$this->logOutput( 'Updating the index mappings...' );
Method extractMessages
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function extractMessages( array $documents ): array {
$messages = $ret = [];
$language = $this->params['language'];
foreach ( $documents as $document ) {
Method identifySafeLanguages
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function identifySafeLanguages(
FileBasedMessageGroup $group,
MessageSourceChange $changesForGroup,
int $importStrategy
): array {
Method getParentGroups
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getParentGroups( MessageGroup $targetGroup ): array {
$ids = self::getSharedGroups( $targetGroup );
if ( $ids === [] ) {
return [];
}
Function showTranslationHelpers
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
showTranslationHelpers: function () {
// API call to get translation suggestions from other languages
// callback should render suggestions to the editor's info column
var api = new mw.Api();
Function prepareMessageGroupRow
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
prepareMessageGroupRow: function ( messagegroup ) {
var $row = $( '<div>' )
.addClass( 'row tux-grouplist__item' )
.attr( 'data-msggroupid', messagegroup.id )
.data( 'msggroup', messagegroup );
Function doFill
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function doFill(ctx, points, mapper, view, color, loop) {
var count = points.length;
var span = view.spanGaps;
var curve0 = [];
var curve1 = [];
Method onSpecialRecentChangesPanel
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function onSpecialRecentChangesPanel( &$extraOpts, $opts ) {
global $wgLang, $wgRequest;
if ( !$this->config->get( 'TranslateRecentChangesLanguageFilter' ) ) {
return;
}
Method showSearch
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function showSearch(
string $search,
string $count,
string $facets,
string $results,
Method getMessageInfoHtml
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getMessageInfoHtml( MessageUpdateParameter $message, Language $language ): string {
$output = Html::openElement( 'dl' );
$tags = [];
if ( $message->isFuzzy() ) {
Method validateMessage
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function validateMessage(
IContextSource $context,
Content $content,
Status $status,
string $summary,
Method tagFuzzy
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function tagFuzzy( array $problematic ): void {
if ( $problematic === [] ) {
return;
}
Method getMarkOperation
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getMarkOperation(
PageRecord $page,
?int $revision,
bool $validateUnitTitle
): TranslatablePageMarkOperation {
Method execute
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute(): void {
$params = $this->extractRequestParams();
// The user we are operating on, not necessarily the user making the request
$user = $this->getUser();
Method searchMessages
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function searchMessages( string $query, int $maxResults ): array {
// Optimized based on requirements:
// * "Natural" sorting of results
// * No need to show which message group things belong to
// * Match at any point in the message
Method searchProfileForm
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function searchProfileForm(
SpecialSearch $search,
string &$form,
string $profile,
string $term,
Method run
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function run() {
$title = $this->title;
$fuzzyBot = FuzzyBot::getUser();
$summary = $this->getSummary();
$base = $this->getBase();