wikimedia/mediawiki-extensions-Wikibase

View on GitHub
repo/rest-api/src/Application/UseCases/PatchStatement/PatchedStatementValidator.php

Summary

Maintainability
A
1 hr
Test Coverage

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

    public function validateAndDeserializeStatement( $patchedStatement ): Statement {
        if (
            !is_array( $patchedStatement ) || ( count( $patchedStatement ) && array_is_list( $patchedStatement ) ) ) {
            throw UseCaseError::newPatchResultInvalidValue( '', $patchedStatement );
        }

    There are no issues that match your filters.

    Category
    Status