| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 9 | public function ensureUnique(RepresentationInterface $representation): void |
||
| 10 | { |
||
| 11 | $key = $this->generateKey($representation); |
||
| 12 | |||
| 13 | if (isset(self::$keys[$key])) { |
||
| 14 | throw new DuplicateRepresentationException("Duplicate '$key' representation"); |
||
| 15 | } |
||
| 16 | |||
| 17 | self::$keys[$key] = true; |
||
| 18 | } |
||
| 27 |