wikimedia/mediawiki-extensions-Wikibase

View on GitHub

Showing 1,432 of 2,096 total issues

Method factory has 11 arguments (exceeds 4 allowed). Consider refactoring.
Open

        AnonymousEditWarningBuilder $anonymousEditWarningBuilder,
        DataTypeFactory $dataTypeFactory,
        MediaWikiEditEntityFactory $editEntityFactory,
        EntityNamespaceLookup $entityNamespaceLookup,
        EntityTitleLookup $entityTitleLookup,
Severity: Major
Found in repo/includes/Specials/SpecialNewProperty.php - About 1 hr to fix

    Method factory has 11 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            ApiMain $mainModule,
            string $moduleName,
            ApiHelperFactory $apiHelperFactory,
            DeserializerFactory $deserializerFactory,
            ChangeOpFactoryProvider $changeOpFactoryProvider,
    Severity: Major
    Found in repo/includes/Api/SetReference.php - About 1 hr to fix

      Method factory has 11 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              ApiMain $mainModule,
              string $moduleName,
              IBufferingStatsdDataFactory $stats,
              ApiHelperFactory $apiHelperFactory,
              ChangeOpFactoryProvider $changeOpFactoryProvider,
      Severity: Major
      Found in repo/includes/Api/SetClaim.php - About 1 hr to fix

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

                ApiMain $mainModule,
                string $moduleName,
                OutputFormatValueFormatterFactory $valueFormatterFactory,
                OutputFormatSnakFormatterFactory $snakFormatterFactory,
                DataTypeFactory $dataTypeFactory,
        Severity: Major
        Found in repo/includes/Api/FormatSnakValue.php - About 1 hr to fix

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

                  bool $isWriteMode,
                  $needsToken,
                  RevisionLookup $revisionLookup,
                  TitleFactory $titleFactory,
                  EntityIdParser $idParser,
          Severity: Major
          Found in repo/includes/Api/EntitySavingHelper.php - About 1 hr to fix

            Method factory has 11 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    ApiMain $mainModule,
                    string $moduleName,
                    IBufferingStatsdDataFactory $stats,
                    ApiHelperFactory $apiHelperFactory,
                    DataTypeFactory $dataTypeFactory,
            Severity: Major
            Found in repo/includes/Api/FormatSnakValue.php - About 1 hr to fix

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

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

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

                        TemplateFactory $templateFactory,
                        UserIdentity $user,
                        EntityDocument $entity,
                        array $termsLanguages,
                        LanguageDirectionalityLookup $languageDirectionalityLookup,

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

                          EntityTermStoreWriter $entityTermStoreWriter,
                          EntityContentDataCodec $contentCodec,
                          EntityConstraintProvider $constraintProvider,
                          ValidatorErrorLocalizer $errorLocalizer,
                          EntityIdParser $entityIdParser,
                  Severity: Major
                  Found in repo/includes/Content/PropertyHandler.php - About 1 hr to fix

                    Function _createListView has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            _createListView: function () {
                                var self = this,
                                    $listviewParent = null;
                    
                                // Re-create listview widget if it exists already
                    Severity: Minor
                    Found in view/resources/jquery/wikibase/jquery.wikibase.snaklistview.js - About 1 hr to fix

                      Function _fillMenu has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              _fillMenu: function () {
                                  var self = this,
                                      deferred = $.Deferred(),
                                      // eslint-disable-next-line no-jquery/no-map-util
                                      badgeIds = $.map( this.options.badges, function ( cssClasses, itemId ) {
                      Severity: Minor
                      Found in view/resources/jquery/wikibase/jquery.wikibase.badgeselector.js - About 1 hr to fix

                        Method formatResult has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            private function formatResult( IResultWrapper $res, int $limit, array $prop ): void {
                                $currentPageId = null;
                                $entry = [];
                                $count = 0;
                        
                        
                        Severity: Minor
                        Found in client/includes/Api/ApiPropsEntityUsage.php - About 1 hr to fix

                          Function Store has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          var Store = function Store (options) {
                            var this$1$1 = this;
                            if ( options === void 0 ) options = {};
                          
                            {
                          Severity: Minor
                          Found in view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js - About 1 hr to fix

                            Method execute has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function execute() {
                                    $referenceJson = $this->getParameter( 'reference' );
                                    $referenceJsonStatus = FormatJson::parse( $referenceJson, FormatJson::FORCE_ASSOC );
                            
                                    if ( !$referenceJsonStatus->isGood() ) {
                            Severity: Minor
                            Found in client/includes/Api/ApiFormatReference.php - About 1 hr to fix

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

                              module.exports = async function ( client, repoOwner, repoName, filePath ) {
                                  const history = [];
                              
                                  let hasNextPage = true;
                                  let endCursor = null;
                              Severity: Minor
                              Found in build/dist-size/analyze/getHistoryForFile.js - About 1 hr to fix

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

                                    protected function getAllowedParams(): array {
                                        return array_merge(
                                            [
                                                'entity' => [
                                                    ParamValidator::PARAM_TYPE => 'string',
                                Severity: Minor
                                Found in repo/includes/Api/CreateClaim.php - About 1 hr to fix

                                  Method addEntityRevision has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function addEntityRevision(
                                          $sourceEntityIdSerialization,
                                          EntityRevision $entityRevision,
                                          $props = 'all',
                                          array $filterSiteIds = null,
                                  Severity: Minor
                                  Found in repo/includes/Api/ResultBuilder.php - About 1 hr to fix

                                    Method execute has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function execute( $subPage ) {
                                            parent::execute( $subPage );
                                    
                                            // Setup
                                            $request = $this->getRequest();
                                    Severity: Minor
                                    Found in repo/includes/Specials/SpecialItemByTitle.php - About 1 hr to fix

                                      Method execute has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function execute(): void {
                                              $params = $this->extractRequestParams();
                                              $this->validateParameters( $params );
                                      
                                              $entityId = $this->guidParser->parse( $params['statement'] )->getEntityId();
                                      Severity: Minor
                                      Found in repo/includes/Api/SetReference.php - About 1 hr to fix

                                        Method getValidator has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function getValidator( $scheme ) {
                                                switch ( $scheme ) {
                                                    // Schemes with "://", copied from $wgUrlProtocols in MediaWiki's DefaultSettings.php
                                                    case 'ftp':
                                                    case 'ftps':
                                        Severity: Minor
                                        Found in repo/includes/Validators/UrlSchemeValidators.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language