Showing 994 of 1,238 total issues
Function update
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
update: function(reset) {
var me = this;
var chart = me.chart;
var chartArea = chart.chartArea;
var opts = chart.options;
Function getCaretPosition
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getCaretPosition: function(tooltipPoint, size, vm) {
var x1, x2, x3, y1, y2, y3;
var caretSize = vm.caretSize;
var cornerRadius = vm.cornerRadius;
var xAlign = vm.xAlign;
Method translationPageHeader
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function translationPageHeader( IContextSource $context, TranslatablePage $page ) {
global $wgTranslateKeepOutdatedTranslations;
$title = $context->getTitle();
if ( !$title->exists() ) {
Method messageSelector
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function messageSelector(): string {
$output = Html::openElement( 'div', [ 'class' => 'row tux-messagetable-header hide' ] );
$output .= Html::openElement( 'div', [ 'class' => 'nine columns' ] );
$output .= Html::openElement( 'ul', [ 'class' => 'row tux-message-selector' ] );
$userId = $this->getUser()->getId();
Method execute
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute( $par ) {
$output = $this->getOutput();
$this->setHeaders();
$this->checkPermissions();
$this->addHelpLink( 'Help:Extension:Translate/Page translation administration' );
Method execute
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute() {
$services = MediaWikiServices::getInstance();
$db = $services->getDBLoadBalancer()->getConnection( DB_PRIMARY );
$dbGroupIds = $db->newSelectQueryBuilder()
Method showAggregateGroups
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function showAggregateGroups( array $aggregates ): void {
$out = $this->getOutput();
$out->addModules( 'ext.translate.special.aggregategroups' );
$nojs = Html::errorBox(
Function getLookupMenuOptionsFromData
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
EntitySelectorWidget.prototype.getLookupMenuOptionsFromData = function ( response ) {
var groups = response.groups || [];
var messages = response.messages || [];
var finalResult = [];
var i = 0;
Method listPages
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function listPages(): void {
$out = $this->getOutput();
$res = self::loadPagesFromDB();
$allPages = self::buildPageArray( $res );
Method setup
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function setup( ?string $parameters ): void {
$request = $this->getRequest();
$defaults = [
'language' => $this->getLanguage()->getCode(),
Method getAllowedParams
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getAllowedParams(): array {
$available = $this->getSearchableTtmServers();
$filters = $this->getAllowedFilters();
Method execute
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute( $parameters ) {
$this->setHeaders();
// Security and validity checks
if ( !$this->userCanExecute( $this->getUser() ) ) {
Method unflattenCLDRPlurals
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function unflattenCLDRPlurals( string $key, string $message ) {
// Quick escape.
if ( !str_contains( $message, '{{PLURAL' ) ) {
return false;
}
File ValidationRunner.php
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* Message validation framework.
*
* @file
Function listen
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
listen: function () {
var groupSelector = this;
// Hide the selector panel when clicking outside of it
$( document.documentElement ).on( 'click', this.hide.bind( this ) );
Method run
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function run(): bool {
// WARNING: Nothing here must not depend on message index being up to date.
// For performance reasons, message index rebuild is run a separate job after
// everything else is updated.
Method fullTable
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function fullTable(): string {
$modules = [];
Services::getInstance()->getHookRunner()->onTranslateBeforeAddModules( $modules );
$this->getOutput()->addModules( $modules );
Method factory
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function factory( string $serviceName, array $config ): ?TranslationWebService {
$handlers = [
'microsoft' => [
'class' => MicrosoftWebService::class,
'deps' => [ 'HttpRequestFactory' ]
Method makeList
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function makeList(): string {
$items = [];
$requests = [];
$users = $this->translateSandbox->getUsers();
Method execute
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute() {
$mwServices = MediaWikiServices::getInstance();
$config = $mwServices->getMainConfig();
if ( !$config->get( 'TranslateGroupSynchronizationCache' ) ) {