| Total Complexity | 3 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 11 | final class FeatureFixtures extends Fixture |
||
| 12 | { |
||
| 13 | public function load(ObjectManager $manager): void |
||
| 14 | { |
||
| 15 | foreach ($this->getFeatureData() as [$name, $icon]) { |
||
| 16 | $feature = new Feature(); |
||
| 17 | $feature->setName($name); |
||
| 18 | $feature->setIcon($icon); |
||
| 19 | $manager->persist($feature); |
||
| 20 | $this->addReference($name, $feature); |
||
| 21 | } |
||
| 22 | $manager->flush(); |
||
| 23 | } |
||
| 24 | |||
| 25 | private function getFeatureData(): array |
||
| 36 | ]; |
||
| 37 | } |
||
| 39 |