wikimedia/mediawiki-core

View on GitHub
includes/specials/pagers/UploadStashPager.php

Summary

Maintainability
A
2 hrs
Test Coverage

Method formatValue has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function formatValue( $field, $value ) {
        $linkRenderer = $this->getLinkRenderer();

        switch ( $field ) {
            case 'us_timestamp':
Severity: Minor
Found in includes/specials/pagers/UploadStashPager.php - About 1 hr to fix

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

            IContextSource $context,
            LinkRenderer $linkRenderer,
            IConnectionProvider $dbProvider,
            UploadStash $stash,
            LocalRepo $localRepo
    Severity: Minor
    Found in includes/specials/pagers/UploadStashPager.php - About 35 mins to fix

      Avoid too many return statements within this method.
      Open

                      return htmlspecialchars( $file->getDimensionsString() )
                          . $this->msg( 'word-separator' )->escaped()
                          . Html::element( 'span', [ 'style' => 'white-space: nowrap;' ],
                              $this->msg( 'parentheses' )->sizeParams( (int)$value )->text()
                          );
      Severity: Major
      Found in includes/specials/pagers/UploadStashPager.php - About 30 mins to fix

        There are no issues that match your filters.

        Category
        Status