Conditions | 3 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
24 | public function load(ObjectManager $objectManager) |
||
25 | { |
||
26 | $faker = FakerFactory::create('de_DE'); |
||
27 | |||
28 | for ($i = 1; $i <= 18; $i++) { |
||
29 | /** @var Team $team */ |
||
30 | $team = $this->getReference('team' . $i); |
||
31 | |||
32 | for ($j = 1; $j <= $this->numberOfEntitiesToCreate; $j++) { |
||
33 | $entity = $this->createEntity($i); |
||
34 | $entity->setName($faker->firstNameMale . ' ' . $faker->lastName); |
||
35 | $entity->setTeam($team); |
||
36 | $objectManager->persist($entity); |
||
37 | } |
||
38 | } |
||
39 | |||
40 | $objectManager->flush(); |
||
41 | } |
||
42 | |||
50 |