ConnectionFixture   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 17
ccs 0
cts 10
cp 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getGroups() 0 3 1
A load() 0 10 1
1
<?php
2
3
namespace App\DataFixtures;
4
5
use App\Entity\Game\Connection;
6
use Doctrine\Bundle\FixturesBundle\Fixture;
7
use Doctrine\Persistence\ObjectManager;
8
use Doctrine\Bundle\FixturesBundle\FixtureGroupInterface;
9
10
class ConnectionFixture extends Fixture implements FixtureGroupInterface
11
{
12
    public function load(ObjectManager $manager): void
13
    {
14
        $connection = new Connection();
15
        $connection->setFromLocationId(11);
16
        $connection->setToLocationId(22);
17
        $connection->setId(1);
18
        $connection->setDirection('north');
19
        $manager->persist($connection);
20
21
        $manager->flush();
22
    }
23
24
    public static function getGroups(): array
25
    {
26
        return ['group1'];
27
    }
28
}
29