wikimedia/mediawiki-core

View on GitHub
includes/Rest/Handler/Helper/RevisionContentHelper.php

Summary

Maintainability
B
4 hrs
Test Coverage

Method getResponseBodySchema has 72 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function getResponseBodySchema() {
        // TODO: we need to reference a re-usable "user" type. The license structure should also be re-usable.
        return [
            'description' => 'revision meta-data',
            'required' => [
Severity: Major
Found in includes/Rest/Handler/Helper/RevisionContentHelper.php - About 2 hrs to fix

    Method constructMetadata has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function constructMetadata(): array {
            $page = $this->getPage();
            $revision = $this->getTargetRevision();
    
            $mainSlot = $revision->getSlot( SlotRecord::MAIN, RevisionRecord::RAW );
    Severity: Minor
    Found in includes/Rest/Handler/Helper/RevisionContentHelper.php - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status