Conditions | 6 |
Paths | 3 |
Total Lines | 24 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | public function __construct(?IndexObject $indexObjectA, ?IndexObject $indexObjectB) |
||
25 | { |
||
26 | assert(!(($indexObjectA === null) && ($indexObjectB === null))); |
||
27 | assert( |
||
28 | ($indexObjectA === null || $indexObjectB === null) || |
||
29 | ($indexObjectA->getRelativePath() === $indexObjectB->getRelativePath()) |
||
30 | ); |
||
31 | |||
32 | if ($indexObjectA instanceof IndexObject) |
||
33 | { |
||
34 | $this->relativePath = $indexObjectA->getRelativePath(); |
||
35 | } |
||
36 | elseif ($indexObjectB instanceof IndexObject) |
||
37 | { |
||
38 | $this->relativePath = $indexObjectB->getRelativePath(); |
||
39 | } |
||
40 | else |
||
41 | { |
||
42 | throw new \LogicException(); |
||
43 | } |
||
44 | |||
45 | $this->indexObjectA = $indexObjectA; |
||
46 | $this->indexObjectB = $indexObjectB; |
||
47 | } |
||
48 | |||
64 |