wikimedia/mediawiki-extensions-Wikibase

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

Summary

Maintainability
A
2 hrs
Test Coverage

Method getSnakFormatter has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function getSnakFormatter( $format, FormatterOptions $options ) {
        $options->defaultOption( SnakFormatter::OPT_ON_ERROR, SnakFormatter::ON_ERROR_WARN );

        $this->valueFormatterFactory->applyLanguageDefaults( $options );
        $lang = $options->getOption( ValueFormatter::OPT_LANG );
Severity: Minor
Found in lib/includes/Formatters/OutputFormatSnakFormatterFactory.php - About 1 hr to fix

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

            array $snakFormatterConstructorCallbacks,
            OutputFormatValueFormatterFactory $valueFormatterFactory,
            PropertyDataTypeLookup $propertyDataTypeLookup,
            DataTypeFactory $dataTypeFactory,
            MessageInLanguageProvider $messageInLanguageProvider
    Severity: Minor
    Found in lib/includes/Formatters/OutputFormatSnakFormatterFactory.php - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status