wikimedia/mediawiki-extensions-Wikibase

View on GitHub

Showing 1,432 of 2,096 total issues

Function _createWidgets has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        _createWidgets: function () {
            var self = this;

            [ 'label', 'description', 'aliases' ].forEach( function ( subjectName ) {
                var widgetName = subjectName + 'view';

    Function _create has 46 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            _create: function () {
                var self = this;
    
                $.ui.suggester.prototype._create.apply( this, arguments );
    
    
    Severity: Minor
    Found in view/resources/jquery/wikibase/jquery.wikibase.siteselector.js - About 1 hr to fix

      Function wbTemplate has 46 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          mw.wbTemplate = function ( key, parameter1 /* [, parameter2[, ...]] */ ) {
              var i,
                  params = [],
                  template,
                  $wrappedTemplate,
      Severity: Minor
      Found in view/resources/wikibase/templates.js - About 1 hr to fix

        Function _create has 46 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                _create: function () {
                    var self = this;
        
                    PARENT.prototype._create.call( this );
        
        
        Severity: Minor
        Found in view/resources/jquery/wikibase/jquery.wikibase.wbtooltip.js - About 1 hr to fix

          Function _create has 46 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  _create: function () {
                      var self = this;
          
                      $.ui.suggester.prototype._create.apply( this, arguments );
          
          
          Severity: Minor
          Found in client/resources/jquery.wikibase/jquery.wikibase.siteselector.js - About 1 hr to fix

            Method rebuildPropertyInfo has 46 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function rebuildPropertyInfo(): int {
                    $propertyNamespace = $this->entityNamespaceLookup->getEntityNamespace(
                        Property::ENTITY_TYPE
                    );
                    if ( $propertyNamespace === null ) {
            Severity: Minor
            Found in repo/includes/Store/Sql/PropertyInfoTableBuilder.php - About 1 hr to fix

              Method saveRedirect has 46 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private function saveRedirect(
                      EntityRedirect $redirect,
                      FormatableSummary $summary,
                      IContextSource $context,
                      bool $bot,
              Severity: Minor
              Found in repo/includes/Interactors/EntityRedirectCreationInteractor.php - About 1 hr to fix

                Method getChangeOps has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private function getChangeOps( Fingerprint $fingerprint ) {
                        $changeOpFactory = $this->changeOpFactory;
                        $changeOps = [];
                
                        if ( $this->label !== '' ) {
                Severity: Minor
                Found in repo/includes/Specials/SpecialSetLabelDescriptionAliases.php - About 1 hr to fix

                  Function save has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          save: function ( newSiteLinkSet, oldSiteLinkSet ) {
                              function getRemovedSiteLinkIds() {
                                  var currentSiteIds = newSiteLinkSet.getKeys();
                                  var removedSiteLinkIds = [];
                  
                  
                  Severity: Minor
                  Found in view/resources/wikibase/entityChangers/SiteLinkSetsChanger.js - About 1 hr to fix

                    Method showData has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function showData( WebRequest $request, OutputPage $output, $format, EntityId $id, $revision ) {
                            $flavor = $request->getRawVal( 'flavor' );
                    
                            /** @var EntityRevision $entityRevision */
                            /** @var RedirectRevision $followedRedirectRevision */
                    Severity: Minor
                    Found in repo/includes/LinkedData/EntityDataRequestHandler.php - About 1 hr to fix

                      Method acquireTermInLangIdsInner has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          private function acquireTermInLangIdsInner(
                              array $typeTextInLangIds,
                              ReplicaPrimaryAwareRecordIdsAcquirer $termInLangIdsAcquirer,
                              array $idsToRestore = []
                          ) {
                      Severity: Minor
                      Found in lib/includes/Store/Sql/Terms/DatabaseTermInLangIdsAcquirer.php - About 1 hr to fix

                        Function mergeParams has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            private mergeParams<action1 extends ApiAction, action2 extends ApiAction>(
                                params1: ApiParams<action1>,
                                params2: ApiParams<action2>,
                            ): ApiParams<action1&action2>|false {
                                const paramNames = new Set( [
                        Severity: Minor
                        Found in client/data-bridge/src/data-access/BatchingApi.ts - About 1 hr to fix

                          Function _initDefaultSource has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  _initDefaultSource: function () {
                                      var self = this;
                          
                                      return function ( term ) {
                                          var deferred = $.Deferred(),
                          Severity: Minor
                          Found in view/resources/jquery/wikibase/jquery.wikibase.entityselector.js - About 1 hr to fix

                            Function exports has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            module.exports = function ( grunt ) {
                                grunt.loadNpmTasks( 'grunt-eslint' );
                                grunt.loadNpmTasks( 'grunt-banana-checker' );
                                grunt.loadNpmTasks( 'grunt-stylelint' );
                            
                            
                            Severity: Minor
                            Found in Gruntfile.js - About 1 hr to fix

                              Function highlightSubstring has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  var highlightSubstring = function ( substring, string, options ) {
                                      if ( substring === '' || string === '' ) {
                                          return string;
                                      }
                              
                              
                              Severity: Minor
                              Found in client/resources/util.highlightSubstring.js - About 1 hr to fix

                                Method getAllowedParams has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function getAllowedParams(): array {
                                        return [
                                            'prop' => [
                                                ParamValidator::PARAM_ISMULTI => true,
                                                ParamValidator::PARAM_TYPE => [
                                Severity: Minor
                                Found in client/includes/Api/ApiListEntityUsage.php - About 1 hr to fix

                                  Function createLogger has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function createLogger (ref) {
                                    if ( ref === void 0 ) ref = {};
                                    var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;
                                    var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };
                                    var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };
                                  Severity: Minor
                                  Found in view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js - About 1 hr to fix

                                    Method saveEntityContent has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        private function saveEntityContent(
                                            EntityContent $entityContent,
                                            User $user,
                                            $summary = '',
                                            $flags = 0,
                                    Severity: Minor
                                    Found in repo/includes/Store/Sql/WikiPageEntityStore.php - About 1 hr to fix

                                      Method getExamplesMessages has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          protected function getExamplesMessages(): array {
                                              $id = $this->sandboxEntityIds[ 'mainItem' ];
                                      
                                              return [
                                                  // Creating new entities
                                      Severity: Minor
                                      Found in repo/includes/Api/EditEntity.php - About 1 hr to fix

                                        Method getAllowedParams has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            protected function getAllowedParams(): array {
                                                $siteIds = $this->siteLinkGlobalIdentifiersProvider->getList( $this->siteLinkGroups );
                                        
                                                return array_merge( parent::getAllowedParams(), [
                                                    'ids' => [
                                        Severity: Minor
                                        Found in repo/includes/Api/GetEntities.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language