| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | public function load(ObjectManager $manager): void |
||
| 14 | { |
||
| 15 | foreach ($this->getCategoryData() as [$slug, $name]) { |
||
| 16 | $category = new Category(); |
||
| 17 | $category->setName($name); |
||
| 18 | $category->setSlug($slug); |
||
| 19 | $manager->persist($category); |
||
| 20 | $this->addReference($name, $category); |
||
| 21 | } |
||
| 22 | $manager->flush(); |
||
| 23 | } |
||
| 36 |