wikimedia/mediawiki-extensions-Wikibase

View on GitHub
repo/rest-api/src/Application/Validation/StatementValidator.php

Summary

Maintainability
A
1 hr
Test Coverage

Method validate has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function validate( array $statementSerialization, string $basePath = '' ): ?ValidationError {
        try {
            $this->deserializedStatement = $this->deserializer->deserialize( $statementSerialization, $basePath );
        } catch ( MissingFieldException $e ) {
            return new ValidationError(
Severity: Minor
Found in repo/rest-api/src/Application/Validation/StatementValidator.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

            return null;
    Severity: Major
    Found in repo/rest-api/src/Application/Validation/StatementValidator.php - About 30 mins to fix

      There are no issues that match your filters.

      Category
      Status