wikimedia/mediawiki-extensions-Wikibase

View on GitHub
repo/includes/Api/GetEntities.php

Summary

Maintainability
C
1 day
Test Coverage

File GetEntities.php has 304 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

declare( strict_types = 1 );

namespace Wikibase\Repo\Api;
Severity: Minor
Found in repo/includes/Api/GetEntities.php - About 3 hrs 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

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

              ApiMain $mainModule,
              string $moduleName,
              StringNormalizer $stringNormalizer,
              LanguageFallbackChainFactory $languageFallbackChainFactory,
              SiteLinkGlobalIdentifiersProvider $siteLinkGlobalIdentifiersProvider,
      Severity: Major
      Found in repo/includes/Api/GetEntities.php - About 1 hr to fix

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

                ApiMain $apiMain,
                string $moduleName,
                SiteLookup $siteLookup,
                IBufferingStatsdDataFactory $stats,
                ApiHelperFactory $apiHelperFactory,
        Severity: Major
        Found in repo/includes/Api/GetEntities.php - About 1 hr to fix

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

              protected function getExamplesMessages(): array {
                  return [
                      "action=wbgetentities&ids=Q42"
                      => "apihelp-wbgetentities-example-1",
                      "action=wbgetentities&ids=P17"
          Severity: Minor
          Found in repo/includes/Api/GetEntities.php - About 1 hr to fix

            There are no issues that match your filters.

            Category
            Status