Showing 994 of 1,238 total issues
Function roundedRect
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
roundedRect: function(ctx, x, y, width, height, radius) {
if (radius) {
var r = Math.min(radius, height / 2, width / 2);
var left = x + r;
var top = y + r;
Function onShowTranslationMemorySources
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
onShowTranslationMemorySources: function ( e, suggestion ) {
e.stopPropagation();
if ( suggestion.$sourcesElement ) {
suggestion.$sourcesElement.toggleClass( 'hide' );
Function eventHandler
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
eventHandler: function(e) {
var me = this;
var tooltip = me.tooltip;
if (core_plugins.notify(me, 'beforeEvent', [e]) === false) {
Method showTitles
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function showTitles( array $messageGroupsIds ): string {
if ( count( $messageGroupsIds ) >= 100 ) {
return $this->msg( 'tpt-manage-message-group-subscriptions-too-many' )->parse();
}
Method execute
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute() {
$dbw = $this->getDB( DB_PRIMARY );
if ( !$dbw->tableExists( 'revtag', __METHOD__ ) ) {
$this->fatalError( "Table revtag doesn't exist. Translate extension is not installed?" );
Method translatablePageHeader
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function translatablePageHeader( $article, &$outputDone, &$pcache ) {
if ( $article->getOldID() ) {
return;
}
Method isValid
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function isValid(): bool {
static $jobHasBeenScheduled = false;
if ( !$this->isMessageNamespace() ) {
return false;
Method getNewTitle
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getNewTitle( Title $title ): Title {
$instructions = $this->map[$title->getNamespace()] ?? null;
if ( $instructions === null ) {
throw new InvalidPageTitleRename(
'Trying to move a page which is not part of the translatable page', self::UNKNOWN_PAGE
Method handleModificationsSubmit
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function handleModificationsSubmit(
MessageGroup $group,
MessageSourceChange $sourceChanges,
WebRequest $req,
string $language,
Method populateQueries
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function populateQueries(): void {
$definition = $this->dataProvider->getDefinition();
$translations = $this->dataProvider->getGoodTranslations();
$sourceLanguage = $this->group->getSourceLanguage();
$targetLanguage = $this->handle->getCode();
Method markAsResolved
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function markAsResolved( string $groupId, ?string $messageTitle = null ): void {
if ( $messageTitle === null ) {
$currentGroupStatus = $this->groupSyncCache->markGroupAsResolved( $groupId );
$this->groupSyncLog->info(
'{user} resolved group {groupId}.',
Method inLanguage
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function inLanguage( string $code ): array {
$dbr = $this->loadBalancer->getConnection( DB_REPLICA, 'vslow' );
$res = $dbr->newSelectQueryBuilder()
->select( [
Method getAllowedParams
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getAllowedParams(): array {
return [
'groupId' => [
ParamValidator::PARAM_TYPE => 'string',
ParamValidator::PARAM_REQUIRED => true,
Method isTranslatableMessage
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function isTranslatableMessage( MessageHandle $handle, string $targetLanguage ): bool {
static $cache = [];
if ( !$handle->isValid() ) {
return false;
Method writeReal
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function writeReal( MessageCollection $collection ): string {
$header = $this->doHeader( $collection );
$header .= $this->doAuthors( $collection );
$header .= "\n";
Method writeReal
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function writeReal( MessageCollection $collection ): string {
$output = '';
$mangler = $this->group->getMangler();
/** @var Message $m */
Method writeReal
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function writeReal( MessageCollection $collection ): string {
$output = $this->doHeader( $collection );
$output .= $this->doAuthors( $collection );
$mangler = $this->group->getMangler();
Function updateElement
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateElement: function(point, index, reset) {
var me = this;
var custom = point.custom || {};
var dataset = me.getDataset();
var scale = me.chart.scale;
Function updateBezierControlPoints
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateBezierControlPoints: function() {
var me = this;
var meta = me.getMeta();
var area = me.chart.chartArea;
var points = meta.data || [];
Method execute
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute() {
global $wgTranslateGroupFiles, $wgTranslateYamlLibrary;
$documents = [];
$times = [];
$mems = [];