Showing 994 of 1,238 total issues
Function updateElement
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateElement: function(arc, index, reset) {
var me = this;
var chart = me.chart;
var dataset = me.getDataset();
var opts = chart.options;
Function determineDataLimits
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
determineDataLimits: function() {
var me = this;
var opts = me.options;
var chart = me.chart;
var datasets = chart.data.datasets;
Method validateUnitNames
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function validateUnitNames(
TranslatablePage $page,
array $units,
bool $includePageDisplayTitle
): Status {
Method prepareTranslationUnits
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function prepareTranslationUnits( TranslatablePage $page, ParserOutput $parserOutput ): array {
$highest = (int)$this->messageGroupMetadata->get( $page->getMessageGroupId(), 'maxid' );
$store = $this->translationUnitStoreFactory->getReader( $page->getPageIdentity() );
$storedUnits = $store->getUnits();
Method showPage
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function showPage(): void {
$out = $this->getOutput();
$user = $this->getUser();
$count = count( $this->stash->getTranslations( $user ) );
Method getData
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getData(): array {
$pageTitle = $this->handle->getTitle();
if ( !$pageTitle->exists() ) {
return [];
}
Method tuxLanguageSelector
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function tuxLanguageSelector(): string {
// The name will be displayed in the UI language,
// so use for lang and dir
$language = $this->getTargetLanguage();
$targetLangName = $this->languageNameUtils->getLanguageName( $language->getCode() );
Method addGroupErrors
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function addGroupErrors( GroupSynchronizationResponse $response ): void {
$groupId = $response->getGroupId();
$remainingMessages = $response->getRemainingMessages();
if ( !$remainingMessages ) {
Method outputForm
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function outputForm(): void {
$fields = [
'group' => [
'type' => 'select',
'name' => 'group',
Method execute
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute() {
$ignoreTrailingWhitespace = $this->getOption( 'ignore-trailing-whitespace' );
$groups = $this->getGroups( $this->getArg( 0 ) );
$matched = count( $groups );
$this->output( "Pattern matched $matched file based message group(s).\n" );
Method handleSourceRename
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function handleSourceRename(
MessageSourceChange $sourceChanges,
string $code,
string $msgKey,
string $keyToRename
Method getAllowedParams
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getAllowedParams(): array {
$allowedParams = [
'depth' => [
ParamValidator::PARAM_TYPE => 'integer',
ParamValidator::PARAM_DEFAULT => 100,
Method breakRename
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function breakRename( $languageCode, $msgKey ) {
$msg = $this->findMessage( $languageCode, $msgKey, [ self::RENAME ] );
if ( $msg === null ) {
return null;
}
Method readFromVariable
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function readFromVariable( string $data ): array {
$lines = explode( "\n", $data );
$authors = $messages = [];
$linecontinuation = false;
Method getExtraSchema
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getExtraSchema(): array {
$schema = [
'root' => [
'_type' => 'array',
'_children' => [
Consider simplifying this complex logical expression. Open
Open
if (circumference < DOUBLE_PI$1) {
var startAngle = opts.rotation % DOUBLE_PI$1;
startAngle += startAngle >= PI$1 ? -DOUBLE_PI$1 : startAngle < -PI$1 ? DOUBLE_PI$1 : 0;
var endAngle = startAngle + circumference;
var startX = Math.cos(startAngle);
Function editGroup
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function editGroup( event ) {
var $target = $( event.target ),
$parent = $target.closest( '.mw-tpa-group' ),
aggregateGroupId = $parent.data( 'groupid' ),
$displayGroup = $parent.children( '.tp-display-group' ),
Function construct
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
construct: function(item, config) {
var me = this;
config = initConfig(config);
Function left
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
left: function ( position, data ) {
var within = data.within,
withinOffset = within.offset.left + within.scrollLeft,
outerWidth = within.width,
offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
Function showMachineTranslations
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
showMachineTranslations: function ( suggestions ) {
if ( !suggestions.length ) {
return;
}