Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
TalkPageResolution
n/a
0 / 0
n/a
0 / 0
4
n/a
0 / 0
 __construct
n/a
0 / 0
n/a
0 / 0
1
 getDiff
n/a
0 / 0
n/a
0 / 0
1
 getOtherIndex
n/a
0 / 0
n/a
0 / 0
1
 getYourIndex
n/a
0 / 0
n/a
0 / 0
1
1<?php
2
3namespace TwoColConflict\TalkPageConflict;
4
5/**
6 * Container for talk page use case resolution.  This is populated by the suggester, and can be
7 * manipulated by editing your text or reordering your and the other text block.
8 *
9 * @codeCoverageIgnore Trivial, even immutable value object
10 *
11 * @license GPL-2.0-or-later
12 */
13class TalkPageResolution {
14
15    /** @var array[] */
16    private array $diff;
17    private int $otherIndex;
18    private int $yourIndex;
19
20    /**
21     * @param array[] $diff A list of changes as created by the AnnotatedHtmlDiffFormatter
22     * @param int $otherIndex
23     * @param int $yourIndex
24     */
25    public function __construct( array $diff, int $otherIndex, int $yourIndex ) {
26        $this->diff = $diff;
27        $this->otherIndex = $otherIndex;
28        $this->yourIndex = $yourIndex;
29    }
30
31    /**
32     * @return array[]
33     */
34    public function getDiff(): array {
35        return $this->diff;
36    }
37
38    public function getOtherIndex(): int {
39        return $this->otherIndex;
40    }
41
42    public function getYourIndex(): int {
43        return $this->yourIndex;
44    }
45
46}