wikimedia/mediawiki-extensions-Wikibase

View on GitHub

Showing 2,096 of 2,096 total issues

Method getFallbackMatchedTermIndexEntries has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

        $text,
        array $languageCodes,
        $termTypes,
        $entityType,
        array $matchedEntityIdSerializations
Severity: Minor
Found in lib/includes/Interactors/MatchingTermsLookupSearchInteractor.php - About 35 mins to fix

    Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            ?FormatterOptions $options,
            ValueFormatter $coordinateFormatter,
            CachingKartographerEmbeddingHandler $cachingKartographerEmbeddingHandler,
            LanguageFactory $languageFactory,
            $emitPreviewHtml
    Severity: Minor
    Found in lib/includes/Formatters/GlobeCoordinateKartographerFormatter.php - About 35 mins to fix

      Method mergeSettings has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              array $defaultSettings,
              array $customSettings,
              array $overrideArrays = [],
              array $twoDArrayMerge = [],
              array $falseMeansRemove = []
      Severity: Minor
      Found in lib/includes/WikibaseSettings.php - About 35 mins to fix

        Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                RepoDomainDb $repoDb,
                string $table,
                string $idColumn,
                int $flags = 0x0,
                int $waitForReplicationTimeout = 2

          Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  EntityNamespaceLookup $entityNamespaceLookup,
                  PageTableEntityQuery $pageTableEntityConditionGenerator,
                  DatabaseEntitySource $entitySource,
                  RepoDomainDb $repoDb,
                  LoggerInterface $logger = null
          Severity: Minor
          Found in lib/includes/Store/Sql/WikiPageEntityMetaDataLookup.php - About 35 mins to fix

            Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    PropertyOrderProvider $propertyOrderProvider,
                    TemplateFactory $templateFactory,
                    EntityIdFormatter $propertyIdFormatter,
                    EditSectionGenerator $sectionEditLinkGenerator,
                    StatementHtmlGenerator $statementHtmlGenerator
            Severity: Minor
            Found in view/src/StatementGroupListView.php - About 35 mins to fix

              Method linkMatches has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      ItemId $itemId,
                      SiteLink $siteLink,
                      ?array $numericIds,
                      ?array $siteIds,
                      ?array $pageNames
              Severity: Minor
              Found in lib/includes/Store/HashSiteLinkStore.php - About 35 mins to fix

                Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        TermListSerializer $termListSerializer,
                        AliasGroupListSerializer $aliasGroupListSerializer,
                        StatementListSerializer $statementListSerializer,
                        SiteLinkSerializer $siteLinkSerializer,
                        bool $useObjectsForEmptyMaps

                  Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                          EntityDiffer $entityDiffer,
                          EntityIdParser $idParser,
                          array $changeClasses,
                          string $defaultEntityChange = EntityChange::class,
                          ?LoggerInterface $logger = null
                  Severity: Minor
                  Found in lib/packages/wikibase/changes/src/EntityChangeFactory.php - About 35 mins to fix

                    Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            DataValueDeserializer $dataValueDeserializer,
                            EntityIdParser $entityIdParser,
                            PropertyDataTypeLookup $dataTypeLookup,
                            array $deserializerBuilders,
                            array $dataTypeToValueTypeMap

                      Function extendVueEnvironment has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          app: App,
                          languageInfoRepo: LanguageInfoRepository,
                          messageRepo: MessagesRepository,
                          repoRouter: MediaWikiRouter,
                          clientRouter: MediaWikiRouter,
                      Severity: Minor
                      Found in client/data-bridge/src/presentation/extendVueEnvironment.ts - About 35 mins to fix

                        Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                Deserializer $entityIdDeserializer,
                                Deserializer $termListDeserializer,
                                Deserializer $aliasGroupListDeserializer,
                                Deserializer $statementListDeserializer,
                                Deserializer $siteLinkDeserializer

                          Method processEntityById has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                  EntityId $id,
                                  EntityId $fromId,
                                  PropertyId $propertyId,
                                  array $toIds,
                                  array &$toVisit

                            Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                    $moduleName = null,
                                    $actionName = null,
                                    $languageCode = null,
                                    array $commentArgs = [],
                                    array $summaryArgs = []
                            Severity: Minor
                            Found in lib/includes/Summary.php - About 35 mins to fix

                              Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                      EntityId $fromId,
                                      PropertyId $propertyId,
                                      array $toIds,
                                      $message = null,
                                      Exception $previous = null

                                Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                        array $labelChanges,
                                        array $descriptionChanges,
                                        array $statementChanges,
                                        array $siteLinkChanges,
                                        $otherChanges
                                Severity: Minor
                                Found in lib/packages/wikibase/changes/src/EntityDiffChangedAspects.php - About 35 mins to fix

                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                  Open

                                                      $( '<li>' )
                                                      .addClass( self.widgetFullName + '-menuitem-' + itemId )
                                                      .data( self.widgetName + '-menuitem-badge', itemId )
                                                      .append( $item
                                                          .prepend( mw.wbTemplate( 'wb-badge',
                                  Severity: Minor
                                  Found in view/resources/jquery/wikibase/jquery.wikibase.badgeselector.js and 1 other location - About 35 mins to fix
                                  view/resources/jquery/wikibase/jquery.wikibase.statementview.RankSelector.js on lines 216..234

                                  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 47.

                                  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

                                  Further Reading

                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                  Open

                                                      $( '<li>' )
                                                      .addClass( self.widgetFullName + '-menuitem-' + rankName )
                                                      .data( self.widgetName + '-menuitem-rank', rank )
                                                      .append(
                                                          $( '<a>' )
                                  view/resources/jquery/wikibase/jquery.wikibase.badgeselector.js on lines 271..280

                                  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 47.

                                  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

                                  Further Reading

                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                  Open

                                  export default function ClientRouterPlugin( app: App, clientRouter: MediaWikiRouter ): void {
                                      app.config.globalProperties.$clientRouter = clientRouter;
                                  }
                                  client/data-bridge/src/presentation/plugins/RepoRouterPlugin/index.ts on lines 4..6

                                  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 47.

                                  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

                                  Further Reading

                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                  Open

                                  export default function RepoRouterPlugin( app: App, repoRouter: MediaWikiRouter ): void {
                                      app.config.globalProperties.$repoRouter = repoRouter;
                                  }
                                  client/data-bridge/src/presentation/plugins/ClientRouterPlugin/index.ts on lines 4..6

                                  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 47.

                                  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

                                  Further Reading

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language