wikimedia/mediawiki-extensions-Wikibase

View on GitHub

Showing 1,432 of 2,096 total issues

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

                        Function getSnakView has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            SELF.prototype.getSnakView = function ( startEditingCallback, drawProperty, options, snak, $snakview, removeCallback ) {
                        Severity: Minor
                        Found in view/resources/wikibase/view/ViewFactory.js - About 45 mins to fix

                          Function _getController has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              SELF.prototype._getController = function ( $container, view, model, onRemove, value, startEditingCallback ) {
                          Severity: Minor
                          Found in view/resources/wikibase/view/ControllerViewFactory.js - About 45 mins to fix

                            Function render has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            function render(_ctx, _cache, $props, $setup, $data, $options) {
                            Severity: Minor
                            Found in view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js - About 45 mins to fix

                              Function getStatementView has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  SELF.prototype.getStatementView = function ( startEditingCallback, entityId, propertyId, removeCallback, value, $dom ) {
                              Severity: Minor
                              Found in view/resources/wikibase/view/ControllerViewFactory.js - About 45 mins to fix

                                Function Poppervue_type_template_id_177cf74e_render has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                function Poppervue_type_template_id_177cf74e_render(_ctx, _cache, $props, $setup, $data, $options) {
                                Severity: Minor
                                Found in view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js - About 45 mins to fix

                                  Function getStatementListView has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      SELF.prototype.getStatementListView = function ( startEditingCallback, entityId, propertyId, getStatementForGuid, value, $statementlistview ) {
                                  Severity: Minor
                                  Found in view/resources/wikibase/view/ViewFactory.js - About 45 mins to fix

                                    Function getStatementView has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        SELF.prototype.getStatementView = function ( startEditingCallback, entityId, propertyId, removeCallback, value, $dom ) {
                                    Severity: Minor
                                    Found in view/resources/wikibase/view/ViewFactory.js - About 45 mins to fix

                                      Function TaintedPoppervue_type_template_id_1cf80a67_render has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                      function TaintedPoppervue_type_template_id_1cf80a67_render(_ctx, _cache, $props, $setup, $data, $options) {
                                      Severity: Minor
                                      Found in view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js - About 45 mins to fix

                                        Function abc5 has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                        /***/ (function(module, __webpack_exports__, __webpack_require__) {
                                        
                                        "use strict";
                                        /* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getDevtoolsGlobalHook; });
                                        /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getTarget; });
                                        Severity: Minor
                                        Found in view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js - About 45 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