wikimedia/mediawiki-extensions-UploadWizard

View on GitHub
includes/ApiMediaDetection.php

Summary

Maintainability
A
1 hr
Test Coverage

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

    private function requestThumbnail( File $file ): MWHttpRequest {
        // we want a thumbnail that has a minimum size in both dimensions,
        // but thumbs are only generated based on width, so we'll calculate
        // the required width to make sure our height also matches the minimum
        $aspectRatio = $file->getWidth() / $file->getHeight();
Severity: Minor
Found in includes/ApiMediaDetection.php - About 1 hr to fix

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

            ApiMain $main,
            string $action,
            IConnectionProvider $dbProvider,
            RepoGroup $repoGroup,
            HttpRequestFactory $httpRequestFactory
    Severity: Minor
    Found in includes/ApiMediaDetection.php - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status