wikimedia/mediawiki-extensions-Wikibase

View on GitHub

Showing 1,432 of 2,096 total issues

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

        RdfVocabulary $vocabulary,
        EntityRdfBuilderFactory $entityRdfBuilderFactory,
        int $flavor,
        RdfWriter $writer,
        DedupeBag $dedupeBag,
Severity: Major
Found in repo/includes/Rdf/RdfBuilder.php - About 1 hr to fix

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

            SiteLinkBadgeChangeOpSerializationValidator $badgeChangeOpSerializationValidator,
            SiteLinkChangeOpFactory $siteLinkChangeOpFactory,
            SiteLinkPageNormalizer $siteLinkPageNormalizer,
            SiteLinkTargetProvider $siteLinkTargetProvider,
            EntityIdParser $entityIdParser,

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

              GuidGenerator $guidGenerator,
              StatementGuidValidator $guidValidator,
              StatementGuidParser $guidParser,
              SnakValidator $snakValidator,
              SnakValidator $referenceSnakValidator,
      Severity: Major
      Found in repo/includes/ChangeOp/StatementChangeOpFactory.php - About 1 hr to fix

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

                EntityTitleStoreLookup $entityTitleStoreLookup,
                PropertyDataTypeLookup $propertyLookup,
                EntityDataFormatProvider $entityDataFormatProvider,
                SerializerFactory $serializerFactory,
                Serializer $entitySerializer,
        Severity: Major
        Found in repo/includes/LinkedData/EntityDataSerializationService.php - About 1 hr to fix

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

                  DispatchingEntityViewFactory $entityViewFactory,
                  DispatchingEntityMetaTagsCreatorFactory $entityMetaTagsCreatorFactory,
                  ParserOutputJsConfigBuilder $configBuilder,
                  TermLanguageFallbackChain $termLanguageFallbackChain,
                  EntityDataFormatProvider $entityDataFormatProvider,
          Severity: Major
          Found in repo/includes/ParserOutput/FullEntityParserOutputGenerator.php - About 1 hr to fix

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

                    HtmlTermRenderer $htmlTermRenderer,
                    LabelDescriptionLookup $labelDescriptionLookup,
                    TemplateFactory $templateFactory,
                    EditSectionGenerator $sectionEditLinkGenerator,
                    LocalizedTextProvider $textProvider,
            Severity: Major
            Found in repo/includes/ParserOutput/PlaceholderEmittingEntityTermsView.php - About 1 hr to fix

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

                      OutputPage $outputPage,
                      TermboxRequestInspector $requestInspector,
                      TermboxRenderer $termboxRenderer,
                      OutputPageEntityIdReader $entityIdReader,
                      RepoSpecialPageLinker $specialPageLinker,

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

                        IContextSource $context,
                        MediaWikiEditEntityFactory $editEntityFactory,
                        LoggerInterface $logger,
                        EditSummaryFormatter $summaryFormatter,
                        PermissionManager $permissionManager,
                Severity: Major
                Found in repo/rest-api/src/Infrastructure/DataAccess/EntityUpdater.php - About 1 hr to fix

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

                          $modelId,
                          $unused,
                          EntityContentDataCodec $contentCodec,
                          EntityConstraintProvider $constraintProvider,
                          ValidatorErrorLocalizer $errorLocalizer,
                  Severity: Major
                  Found in repo/includes/Content/EntityHandler.php - About 1 hr to fix

                    Method setServices has 8 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            SqlEntityIdPagerFactory $sqlEntityIdPagerFactory,
                            array $existingEntityTypes,
                            EntityPrefetcher $entityPrefetcher,
                            PropertyDataTypeLookup $propertyDataTypeLookup,
                            EntityRevisionLookup $entityRevisionLookup,
                    Severity: Major
                    Found in repo/maintenance/dumpJson.php - About 1 hr to fix

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

                              PatchStatementValidator $useCaseValidator,
                              PatchedStatementValidator $patchedStatementValidator,
                              PatchJson $jsonPatcher,
                              StatementSerializer $statementSerializer,
                              AssertStatementSubjectExists $assertStatementSubjectExists,

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

                                TemplateFactory $templateFactory,
                                CacheableEntityTermsView $entityTermsView,
                                LanguageDirectionalityLookup $languageDirectionalityLookup,
                                StatementSectionsView $statementSectionsView,
                                $languageCode,
                        Severity: Major
                        Found in view/src/ItemView.php - About 1 hr to fix

                          Function b622 has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                          Open

                          /***/ (function(module, exports, __webpack_require__) {
                          
                          var global = __webpack_require__("da84");
                          var shared = __webpack_require__("5692");
                          var has = __webpack_require__("5135");
                          Severity: Minor
                          Found in view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js - About 55 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function 94ca has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                          Open

                          /***/ (function(module, exports, __webpack_require__) {
                          
                          var fails = __webpack_require__("d039");
                          
                          var replacement = /#|\.prototype\./;
                          Severity: Minor
                          Found in view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js - About 55 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function d2bb has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                          Open

                          /***/ (function(module, exports, __webpack_require__) {
                          
                          /* eslint-disable no-proto -- safe */
                          var anObject = __webpack_require__("825a");
                          var aPossiblePrototype = __webpack_require__("3bbe");
                          Severity: Minor
                          Found in view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js - About 55 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function ca84 has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                          Open

                          /***/ (function(module, exports, __webpack_require__) {
                          
                          var has = __webpack_require__("5135");
                          var toIndexedObject = __webpack_require__("fc6a");
                          var indexOf = __webpack_require__("4d64").indexOf;
                          Severity: Minor
                          Found in view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js - About 55 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function getTerm has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                          Open

                              private function getTerm( EntityId $entityId, string $languageCode, string $termType ): ?string {
                                  $resolutionResult = $this->redirectResolvingLatestRevisionLookup->lookupLatestRevisionResolvingRedirect( $entityId );
                                  if ( $resolutionResult === null ) {
                                      return null;
                                  }
                          Severity: Minor
                          Found in client/includes/DataAccess/Scribunto/CachingFallbackBasedTermLookup.php - About 55 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function getChangedAspects has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function getChangedAspects( EntityChange $change ) {
                                  $aspects = [];
                                  $diffAspects = $change->getCompactDiff();
                          
                                  if ( $diffAspects->getSiteLinkChanges() !== [] ) {
                          Severity: Minor
                          Found in client/includes/Changes/AffectedPagesFinder.php - About 55 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function rebuildTermsForBatch has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                          Open

                              private function rebuildTermsForBatch( array $itemIds ) {
                                  foreach ( $itemIds as $itemId ) {
                                      try {
                                          $item = $this->itemLookup->getItemForId( $itemId );
                                      } catch ( UnresolvedEntityRedirectException $entityRedirectException ) {
                          Severity: Minor
                          Found in repo/includes/Store/ItemTermsRebuilder.php - About 55 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function generateOpHtml has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                          Open

                              protected function generateOpHtml( array $path, DiffOp $op ) {
                                  if ( $op->isAtomic() ) {
                                      $localizedPath = $path;
                          
                                      $html = $this->generateDiffHeaderHtml( implode( ' / ', $localizedPath ) );
                          Severity: Minor
                          Found in repo/includes/Diff/BasicDiffView.php - About 55 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Severity
                          Category
                          Status
                          Source
                          Language