wikimedia/mediawiki-extensions-Wikibase

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

Summary

Maintainability
A
2 hrs
Test Coverage

Method execute has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function execute( PatchItemRequest $request ): PatchItemResponse {
        $deserializedRequest = $this->validator->validateAndDeserialize( $request );
        $providedMetadata = $deserializedRequest->getEditMetadata();
        $itemId = $deserializedRequest->getItemId();

Severity: Minor
Found in repo/rest-api/src/Application/UseCases/PatchItem/PatchItem.php - About 1 hr to fix

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

            PatchItemValidator $validator,
            AssertItemExists $assertItemExists,
            AssertUserIsAuthorized $assertUserIsAuthorized,
            ItemRetriever $itemRetriever,
            ItemSerializer $itemSerializer,
    Severity: Major
    Found in repo/rest-api/src/Application/UseCases/PatchItem/PatchItem.php - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status