| Total Complexity | 6 |
| Total Lines | 57 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class ReferenceRepository extends \Doctrine\Common\DataFixtures\ReferenceRepository |
||
| 12 | {
|
||
| 13 | /** |
||
| 14 | * @var iterable|array |
||
| 15 | */ |
||
| 16 | private $collectionReferences = []; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param string $name |
||
| 20 | * |
||
| 21 | * @return bool |
||
| 22 | */ |
||
| 23 | public function hasCollectionReference(string $name): bool |
||
| 24 | {
|
||
| 25 | return array_key_exists($name, $this->collectionReferences); |
||
|
|
|||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param string $name |
||
| 30 | * |
||
| 31 | * @return iterable |
||
| 32 | */ |
||
| 33 | public function getCollectionReference(string $name): iterable |
||
| 39 | } |
||
| 40 | |||
| 41 | |||
| 42 | /** |
||
| 43 | * @param string $name |
||
| 44 | * @param iterable $collection |
||
| 45 | */ |
||
| 46 | public function setCollectionReference(string $name, iterable $collection): void |
||
| 47 | {
|
||
| 48 | $this->collectionReferences[$name] = $collection; |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @param string $name |
||
| 53 | * @param iterable $collection |
||
| 54 | * |
||
| 55 | * @throws \BadFunctionCallException |
||
| 56 | */ |
||
| 57 | public function addCollectionReference(string $name, iterable $collection): void |
||
| 68 | } |
||
| 69 | } |
||
| 70 |