wikimedia/mediawiki-extensions-Wikibase

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

Summary

Maintainability
A
3 hrs
Test Coverage

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

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

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

            ItemId $fromId,
            ItemId $toId,
            array $ignoreConflicts,
            ?string $summary,
            bool $bot,
    Severity: Major
    Found in repo/includes/Api/MergeItems.php - About 50 mins to fix

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

              ApiMain $mainModule,
              string $moduleName,
              ItemMergeInteractor $interactor,
              ApiErrorReporter $errorReporter,
              callable $resultBuilderInstantiator,
      Severity: Minor
      Found in repo/includes/Api/MergeItems.php - About 45 mins to fix

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

                ApiMain $mainModule,
                string $moduleName,
                ApiHelperFactory $apiHelperFactory,
                ItemMergeInteractor $interactor,
                SettingsArray $settings
        Severity: Minor
        Found in repo/includes/Api/MergeItems.php - About 35 mins to fix

          There are no issues that match your filters.

          Category
          Status