Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3declare( strict_types = 1 );
4
5namespace EntitySchema\DataAccess;
6
7use EntitySchema\Domain\Model\EntitySchemaId;
8use MediaWiki\CommentStore\CommentStoreComment;
9
10/**
11 * @license GPL-2.0-or-later
12 */
13interface EntitySchemaUpdater {
14
15    /**
16     * Update a Schema with new content. This will remove existing schema content.
17     *
18     * @param EntitySchemaId $id
19     * @param string[] $labels
20     * @param string[] $descriptions
21     * @param string[][] $aliasGroups
22     * @param string $schemaText
23     * @param int $baseRevId
24     * @param CommentStoreComment $summary
25     */
26    public function overwriteWholeSchema(
27        EntitySchemaId $id,
28        array $labels,
29        array $descriptions,
30        array $aliasGroups,
31        string $schemaText,
32        int $baseRevId,
33        CommentStoreComment $summary
34    ): EntitySchemaStatus;
35
36    /**
37     * @param EntitySchemaId $id
38     * @param string $langCode
39     * @param string $label
40     * @param string $description
41     * @param string[] $aliases
42     * @param int $baseRevId
43     */
44    public function updateSchemaNameBadge(
45        EntitySchemaId $id,
46        string $langCode,
47        string $label,
48        string $description,
49        array $aliases,
50        int $baseRevId
51    ): EntitySchemaStatus;
52
53    /**
54     * @param EntitySchemaId $id
55     * @param string $schemaText
56     * @param int $baseRevId id of the base revision for detecting edit conflicts.
57     * @param string|null $userSummary
58     */
59    public function updateSchemaText(
60        EntitySchemaId $id,
61        string $schemaText,
62        int $baseRevId,
63        ?string $userSummary = null
64    ): EntitySchemaStatus;
65
66}