wikimedia/mediawiki-extensions-Wikibase

View on GitHub
lib/includes/SimpleCacheWithBagOStuff.php

Summary

Maintainability
A
1 hr
Test Coverage

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

    private function decode( string $string, array $loggingContext ): ?array {
        $result = json_decode( $string );

        if ( !is_array( $result ) || count( $result ) !== 3 ) {
            $this->logger->alert( 'Unknown or invalid cache format', $loggingContext + [
Severity: Minor
Found in lib/includes/SimpleCacheWithBagOStuff.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

            return [ 'signatureToCheck' => $signatureToCheck, 'data' => $data ];
    Severity: Major
    Found in lib/includes/SimpleCacheWithBagOStuff.php - About 30 mins to fix

      There are no issues that match your filters.

      Category
      Status