wikimedia/mediawiki-extensions-Wikibase

View on GitHub
repo/rest-api/src/Domain/Model/CreateItemEditSummary.php

Summary

Maintainability
A
1 hr
Test Coverage
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Domain\Model;

/**
 * @license GPL-2.0-or-later
 */
class CreateItemEditSummary implements EditSummary {

    private string $editAction;
    private ?string $userComment;

    private function __construct( ?string $userComment ) {
        $this->editAction = self::ADD_ACTION;
        $this->userComment = $userComment;
    }

    public static function newSummary( ?string $userComment ): self {
        return new self( $userComment );
    }

    public function getEditAction(): string {
        return $this->editAction;
    }

    public function getUserComment(): ?string {
        return $this->userComment;
    }

}