wikimedia/mediawiki-extensions-Wikibase

View on GitHub
lib/includes/Formatters/WikibaseValueFormatterBuilders.php

Summary

Maintainability
C
1 day
Test Coverage

File WikibaseValueFormatterBuilders.php has 335 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

declare( strict_types = 1 );

namespace Wikibase\Lib\Formatters;
Severity: Minor
Found in lib/includes/Formatters/WikibaseValueFormatterBuilders.php - About 4 hrs to fix

    WikibaseValueFormatterBuilders has 23 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class WikibaseValueFormatterBuilders {
    
        /**
         * @var FormatterLabelDescriptionLookupFactory
         */
    Severity: Minor
    Found in lib/includes/Formatters/WikibaseValueFormatterBuilders.php - About 2 hrs to fix

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

              FormatterLabelDescriptionLookupFactory $labelDescriptionLookupFactory,
              LanguageNameLookupFactory $languageNameLookupFactory,
              EntityIdParser $itemUriParser,
              string $geoShapeStorageBaseUrl,
              string $tabularDataStorageBaseUrl,
      Severity: Major
      Found in lib/includes/Formatters/WikibaseValueFormatterBuilders.php - About 2 hrs to fix

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

            public function newGlobeCoordinateFormatter( $format, FormatterOptions $options ) {
                $isHtmlVerboseFormat = $this->snakFormat->isPossibleFormat( SnakFormatter::FORMAT_HTML_VERBOSE, $format );
        
                if ( $isHtmlVerboseFormat && $this->kartographerEmbeddingHandler ) {
                    $isPreview = $format === SnakFormatter::FORMAT_HTML_VERBOSE_PREVIEW;
        Severity: Minor
        Found in lib/includes/Formatters/WikibaseValueFormatterBuilders.php - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status