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