Passed
Push — master ( 732152...809fdb )
by Florian
03:32
created

LoadSemester   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 7
dl 0
loc 25
c 0
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getOrder() 0 3 1
A load() 0 6 1
1
<?php
2
3
/*
4
 * This file is part of the feedback project.
5
 *
6
 * (c) Florian Moser <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace App\DataFixtures;
13
14
use App\DataFixtures\Base\BaseFixture;
15
use App\Entity\Semester;
16
use Doctrine\Common\Persistence\ObjectManager;
17
18
class LoadSemester extends BaseFixture
19
{
20
    const ORDER = 1;
21
22
    /**
23
     * Load data fixtures with the passed EntityManager.
24
     *
25
     * @param ObjectManager $manager
26
     */
27
    public function load(ObjectManager $manager)
28
    {
29
        $semester = new Semester();
30
        $semester->setName('HS 2018');
31
        $manager->persist($semester);
32
        $manager->flush();
33
    }
34
35
    /**
36
     * Get the order of this fixture.
37
     *
38
     * @return int
39
     */
40
    public function getOrder()
41
    {
42
        return static::ORDER;
43
    }
44
}
45