| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 57 | public function addCollectionReference(string $name, iterable $collection): void |
||
| 58 | {
|
||
| 59 | if (isset($this->collectionReferences[$name])) {
|
||
| 60 | throw new \BadMethodCallException( |
||
| 61 | sprintf( |
||
| 62 | 'Reference to "%s" already exists, use method setCollectionReference in order to override it', |
||
| 63 | $name |
||
| 64 | ) |
||
| 65 | ); |
||
| 66 | } |
||
| 67 | $this->setCollectionReference($name, $collection); |
||
| 68 | } |
||
| 70 |