wikimedia/mediawiki-extensions-Wikibase

View on GitHub

Showing 2,096 of 2,096 total issues

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

        ItemId $id,
        array $requestedFields,
        ?Labels $labels,
        ?Descriptions $descriptions,
        ?Aliases $aliases,
Severity: Major
Found in repo/rest-api/src/Domain/ReadModel/ItemParts.php - About 50 mins to fix

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

            string $propertyId,
            string $languageCode,
            array $aliases,
            array $editTags,
            bool $isBot,

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

              string $propertyId,
              string $languageCode,
              string $description,
              array $editTags,
              bool $isBot,

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

                string $itemId,
                string $languageCode,
                array $aliases,
                array $editTags,
                bool $isBot,

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

                  string $itemId,
                  string $languageCode,
                  string $label,
                  array $editTags,
                  bool $isBot,

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

                    string $itemId,
                    string $statementId,
                    array $statement,
                    array $editTags,
                    bool $isBot,

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

                      string $itemId,
                      string $siteId,
                      array $sitelink,
                      array $editTags,
                      bool $isBot,

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

                        PropertyId $id,
                        array $requestedFields,
                        ?string $dataType,
                        ?Labels $labels,
                        ?Descriptions $descriptions,
                Severity: Major
                Found in repo/rest-api/src/Domain/ReadModel/PropertyParts.php - About 50 mins to fix

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

                          LabelsSyntaxValidator $labelsSyntaxValidator,
                          ItemLabelsContentsValidator $labelsContentsValidator,
                          DescriptionsSyntaxValidator $descriptionsSyntaxValidator,
                          ItemDescriptionsContentsValidator $descriptionsContentsValidator,
                          AliasesValidator $aliasesValidator,

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

                            string $propertyId,
                            string $statementId,
                            array $statement,
                            array $editTags,
                            bool $isBot,

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

                              ?NumericPropertyId $referenceUrlPropertyId,
                              ?NumericPropertyId $titlePropertyId,
                              ?NumericPropertyId $statedInPropertyId,
                              ?NumericPropertyId $authorPropertyId,
                              ?NumericPropertyId $publisherPropertyId,
                      Severity: Major
                      Found in lib/includes/Formatters/Reference/WellKnownReferenceProperties.php - About 50 mins to fix

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

                                $cacheType,
                                LoggerInterface $logger,
                                IBufferingStatsdDataFactory $statsdDataFactory,
                                string $cacheSecret,
                                TermFallbackCacheServiceFactory $serviceFactory,
                        Severity: Major
                        Found in lib/includes/TermFallbackCacheFactory.php - About 50 mins to fix

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

                                  $name,
                                  $databaseName,
                                  array $entityNamespaceIdsAndSlots,
                                  $conceptBaseUri,
                                  $rdfNodeNamespacePrefix,
                          Severity: Major
                          Found in data-access/src/DatabaseEntitySource.php - About 50 mins to fix

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

                                    _createMenuItemFromSuggestion: function ( site, requestTerm ) {
                                        return new $.wikibase.siteselector.Item(
                                            this._createItemLabel( site, requestTerm ),
                                            this._createItemValue( site ),
                                            site
                            Severity: Minor
                            Found in view/resources/jquery/wikibase/jquery.wikibase.siteselector.js and 1 other location - About 50 mins to fix
                            client/resources/jquery.wikibase/jquery.wikibase.siteselector.js on lines 285..291

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

                            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

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

                            ( function () {
                                'use strict';
                            
                                var SELF = function () {};
                            
                            
                            view/resources/wikibase/entityIdFormatter/EntityIdHtmlFormatter.js on lines 1..10

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

                            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

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

                                    _createMenuItemFromSuggestion: function ( site, requestTerm ) {
                                        return new $.wikibase.siteselector.Item(
                                            this._createItemLabel( site, requestTerm ),
                                            this._createItemValue( site ),
                                            site
                            view/resources/jquery/wikibase/jquery.wikibase.siteselector.js on lines 282..288

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

                            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

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

                            ( function () {
                                'use strict';
                            
                                var SELF = function () {};
                            
                            
                            view/resources/wikibase/entityIdFormatter/EntityIdPlainFormatter.js on lines 1..10

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

                            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

                                content: Object(external_vue_["withCtx"])(() => [Object(external_vue_["createElementVNode"])("p", TaintedPoppervue_type_template_id_1cf80a67_hoisted_3, Object(external_vue_["toDisplayString"])(_ctx.popperText), 1), Object(external_vue_["createElementVNode"])("button", {
                                  class: "wb-tr-popper-remove-warning",
                                  onClick: _cache[1] || (_cache[1] = (...args) => _ctx.removeWarningClick && _ctx.removeWarningClick(...args))
                                }, Object(external_vue_["toDisplayString"])(_ctx.removeWarningText), 1)]),
                            Severity: Minor
                            Found in view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js and 1 other location - About 50 mins to fix
                            view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js on lines 2078..2081

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

                            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

                              }, [Poppervue_type_template_id_177cf74e_hoisted_1, Object(external_vue_["createElementVNode"])("div", Poppervue_type_template_id_177cf74e_hoisted_2, [Object(external_vue_["createElementVNode"])("div", Poppervue_type_template_id_177cf74e_hoisted_3, [Object(external_vue_["createElementVNode"])("span", _hoisted_4, Object(external_vue_["toDisplayString"])(_ctx.title), 1), Object(external_vue_["createElementVNode"])("button", {
                                class: "wb-tr-popper-close",
                                onClick: _cache[0] || (_cache[0] = (...args) => _ctx.closeClick && _ctx.closeClick(...args))
                              })]), Object(external_vue_["createElementVNode"])("div", _hoisted_5, [Object(external_vue_["renderSlot"])(_ctx.$slots, "subheading-area")]), Object(external_vue_["createElementVNode"])("div", _hoisted_6, [Object(external_vue_["renderSlot"])(_ctx.$slots, "content")])])], 32);
                            Severity: Minor
                            Found in view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js and 1 other location - About 50 mins to fix
                            view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js on lines 2040..2043

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

                            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 3 locations. Consider refactoring.
                            Open

                                public function __construct(
                                    StatementTransclusionInteractor $plainTextTransclusionInteractor,
                                    StatementTransclusionInteractor $richWikitextTransclusionInteractor,
                                    EntityIdParser $entityIdParser,
                                    ContentLanguages $termsLanguages,
                            client/includes/Hooks/SiteLinksForDisplayLookup.php on lines 49..63
                            view/src/TermsListView.php on lines 30..44

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

                            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