Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | public function load(ObjectManager $manager) { |
||
25 | $data = include('fixtures/projects.php'); |
||
26 | foreach ($data as $projectData) |
||
27 | { |
||
28 | $project = |
||
29 | (new Project()) |
||
30 | ->setId($projectData['id']) |
||
31 | ->setName($projectData['name']) |
||
32 | ->setSlug($projectData['slug']) |
||
33 | ->setDescription($projectData['description']) |
||
34 | ->setCreatedAt(new \DateTime($projectData['created_at'])) |
||
35 | ; |
||
36 | $manager->persist($project); |
||
37 | $this->addReference("project-{$project->getId()}", $project); |
||
38 | } |
||
39 | $manager->flush(); |
||
40 | $manager->clear(Project::class); |
||
41 | } |
||
42 | /** |
||
49 |