Showing 994 of 1,238 total issues
Method execute
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute() {
$this->contentLanguage = MediaWikiServices::getInstance()->getContentLanguage();
$threads = (int)$this->getOption( 'threads', 1 );
$outputDir = $this->getOption( 'output-directory' );
Method createQueryBuilder
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function createQueryBuilder( IReadableDatabase $database, string $caller ): SelectQueryBuilder {
global $wgTranslateMessageNamespaces;
$fields = [ 'log_timestamp' ];
Method normalize
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function normalize( array $validCounts ): void {
$this->formOptions->validateIntBounds( 'days', 1, 10000 );
$this->formOptions->validateIntBounds( 'width', 200, 1000 );
$this->formOptions->validateIntBounds( 'height', 200, 1000 );
Method onArticleViewHeader
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function onArticleViewHeader( $article, &$outputDone, &$pcache ) {
if ( !$this->enableIntegration ) {
return;
}
Method levenshtein
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function levenshtein( string $str1, string $str2, int $length1, int $length2 ): int {
if ( $length1 === 0 ) {
return $length2;
}
Method getLatestRevisionsForTags
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getLatestRevisionsForTags( PageIdentity $identity, string ...$tags ): ?array {
if ( !$identity->exists() ) {
return null;
}
Method addValidator
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function addValidator( array $validatorConfig ): void {
$validatorId = $validatorConfig['id'] ?? null;
$className = $validatorConfig['class'] ?? null;
if ( $validatorId !== null ) {
Method reloadIgnorePatterns
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function reloadIgnorePatterns(): void {
$validationExclusionFile = Services::getInstance()->getConfigHelper()->getValidationExclusionFile();
if ( $validationExclusionFile === false ) {
self::$ignorePatterns = [];
Function descriptors
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
descriptors: function(chart) {
var cache = chart.$plugins || (chart.$plugins = {});
if (cache.id === this._cacheId) {
return cache.descriptors;
}
Function changeSettings
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
changeSettings: function ( changes ) {
// Clear current messages
this.clear();
this.settings = $.extend( this.settings, changes );
Function showTranslations
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function showTranslations( translations ) {
var $target = $( '.translations' );
$target.empty();
Function _drawLabels
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_drawLabels: function() {
var me = this;
var optionTicks = me.options.ticks;
if (!optionTicks.display) {
Method tryMatch
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function tryMatch( $code, $mws, $gtLanguages, $clLanguages ) {
if ( $mws !== '' ) {
$mwExp = true;
$lang = MediaWikiServices::getInstance()->getLanguageFactory()->getLanguage( $code );
} else {
Function computeLinearBoundary
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function computeLinearBoundary(source) {
var model = source.el._model || {};
var scale = source.el._scale || {};
var fill = source.fill;
var target = null;
Function drawRadiusLine
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function drawRadiusLine(scale, gridLineOpts, radius, index) {
var ctx = scale.ctx;
var circular = gridLineOpts.circular;
var valueCount = scale.chart.data.labels.length;
var lineColor = valueAtIndexOrDefault$1(gridLineOpts.color, index - 1);
Method execute
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute() {
$groups = MessageGroups::singleton()->getGroups();
$mwInstance = MediaWikiServices::getInstance();
$jobQueueGroup = $mwInstance->getJobQueueGroup();
Method parseUnit
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function parseUnit( string $content ): TranslationUnit {
$re = '~<!--T:(.*?)-->~';
$matches = [];
$count = preg_match_all( $re, $content, $matches, PREG_SET_ORDER );
Method store
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function store( array $array, array $diff ): void {
$updates = [];
foreach ( [ $diff['add'], $diff['mod'] ] as $changes ) {
foreach ( $changes as $key => $data ) {
Method createIndex
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function createIndex( bool $rebuild ): void {
$indexSettings = [
'settings' => [
'index' => [
'number_of_shards' => $this->getShardCount(),
Method showPage
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function showPage(): void {
$out = $this->getOutput();
$nojs = Html::errorBox(
$this->msg( 'tux-nojs' )->escaped(),