Passed
Push — master ( 62083f...ad8d4a )
by Julito
10:31
created

SkillFixtures   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
dl 0
loc 16
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 14 1
1
<?php
2
3
declare(strict_types=1);
4
5
/* For licensing terms, see /license.txt */
6
7
namespace Chamilo\CoreBundle\DataFixtures;
8
9
use Chamilo\CoreBundle\Entity\Skill;
10
use Doctrine\Bundle\FixturesBundle\Fixture;
11
use Doctrine\Persistence\ObjectManager;
12
13
class SkillFixtures extends Fixture
14
{
15
    public function load(ObjectManager $manager): void
16
    {
17
        /*INSERT INTO skill (name, icon, description, short_code, access_url_id, updated_at) VALUES ('Root', '', '', 'root', 1, now());
18
        INSERT INTO skill_rel_skill VALUES(1, 1, 0, 0, 0);*/
19
20
        // @todo check if we still need skill_rel_skill
21
        $skill = (new Skill())
22
            ->setName('Root')
23
            ->setShortCode('root')
24
            ->setAccessUrlId(1)
25
        ;
26
        $manager->persist($skill);
27
28
        $manager->flush();
29
    }
30
}
31