Showing 2,096 of 2,096 total issues
Function initLinkItem
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initLinkItem( elem ) {
var $spinner = $.createSpinner(),
$linkItemLink = $( elem );
$linkItemLink
Function _create
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function () {
var self = this;
PARENT.prototype._create.call( this );
Function _createListView
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
_createListView: function () {
var self = this,
listItemWidget = $.wikibase.entitytermsforlanguageview,
prefix = listItemWidget.prototype.widgetEventPrefix;
Function _create
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function () {
if ( !( this.options.value instanceof datamodel.Fingerprint )
|| !Array.isArray( this.options.userLanguages )
) {
throw new Error( 'Required option(s) missing' );
Method run
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run(): bool {
$change = $this->getChange();
$titles = $this->getTitles();
if ( !$change || $titles === [] ) {
Method getStatus
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getStatus( WebRequest $req, RevisionRecord $latestRevision ): Status {
if ( $req->getCheck( 'restore' ) ) { // nearly the same as undoafter without undo
$olderRevision = $this->revisionLookup->getRevisionById( $req->getInt( 'restore' ) );
if ( !$olderRevision ) {
Method getFormFields
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getFormFields() {
$formFields = [
self::FIELD_LANG => [
'name' => self::FIELD_LANG,
'class' => HTMLContentLanguageField::class,
Method __construct
has 16 arguments (exceeds 4 allowed). Consider refactoring. Open
array $tags,
SpecialPageCopyrightView $copyrightView,
EntityNamespaceLookup $entityNamespaceLookup,
SummaryFormatter $summaryFormatter,
EntityTitleLookup $entityTitleLookup,
Method __construct
has 16 arguments (exceeds 4 allowed). Consider refactoring. Open
EntityTitleStoreLookup $entityTitleStoreLookup,
ExceptionLocalizer $exceptionLocalizer,
PropertyDataTypeLookup $dataTypeLookup,
SiteLookup $siteLookup,
SummaryFormatter $summaryFormatter,
Method __construct
has 16 arguments (exceeds 4 allowed). Consider refactoring. Open
HttpRequestFactory $httpRequestFactory,
IBufferingStatsdDataFactory $statsdDataFactory,
SettingsArray $repoSettings,
TemplateFactory $templateFactory,
EntityRevisionLookup $entityRevisionLookup,
Method __construct
has 16 arguments (exceeds 4 allowed). Consider refactoring. Open
DispatchingEntityViewFactory $entityViewFactory,
DispatchingEntityMetaTagsCreatorFactory $entityMetaTagsCreatorFactory,
EntityTitleLookup $entityTitleLookup,
LanguageFallbackChainFactory $languageFallbackChainFactory,
EntityDataFormatProvider $entityDataFormatProvider,
Identical blocks of code found in 2 locations. Consider refactoring. Open
_initStatements: function () {
this.options.buildStatementGroupListView( this.options.value, this.$statements );
// This is here to be sure there is never a duplicate id:
$( '.wikibase-statementgrouplistview' )
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 75.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
_initStatements: function () {
this.options.buildStatementGroupListView( this.options.value, this.$statements );
// This is here to be sure there is never a duplicate id:
$( '.wikibase-statementgrouplistview' )
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 75.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (!options || !options.root) {
type = namespace + type;
if (!store._actions[type]) {
console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
return
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 75.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (!options || !options.root) {
type = namespace + type;
if (!store._mutations[type]) {
console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
return
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 75.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function buildGeoShapeValidators( string $checkExistence = 'checkExistence' ): array {
$validators = $this->getCommonStringValidators( 240 );
//Don't forget to change message `wikibase-validator-illegal-geo-shape-title` modifying this
// Check for 'Data:' prefix, '.map' extension and illegal characters
$validators[] = new RegexValidator(
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 121.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function buildTabularDataValidators( string $checkExistence = 'checkExistence' ): array {
$validators = $this->getCommonStringValidators( 240 );
$validators[] = new RegexValidator(
'/^Data:[^\\[\\]#\\\:{|}]+\.tab$/u',
false,
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 121.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Method handleChange
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handleChange( EntityChange $change, array $rootJobParams = [] ) {
$changeId = $this->getChangeIdForLog( $change );
$this->logger->debug(
'{method}: handling change #{changeId} ({changeType})',
Method __construct
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct() {
parent::__construct();
$this->addDescription( 'Populates Wikibase db with randomly generated entities and terms' );
Method execute
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute() {
//TODO: more validation for options
$shardingFactor = (int)$this->getOption( 'sharding-factor', 1 );
$shard = (int)$this->getOption( 'shard', 0 );
$batchSize = (int)$this->getOption( 'batch-size', 100 );