TimetableWeekFixtures   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 12
dl 0
loc 21
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 16 1
1
<?php
2
3
namespace App\DataFixtures;
4
5
use App\Entity\TimetableWeek;
6
use Doctrine\Bundle\FixturesBundle\Fixture;
7
use Doctrine\Persistence\ObjectManager;
8
9
class TimetableWeekFixtures extends Fixture {
10
11
    /**
12
     * @inheritDoc
13
     */
14
    public function load(ObjectManager $manager) {
15
        $manager->persist(
16
            (new TimetableWeek())
17
            ->setKey('A')
18
            ->setDisplayName('A-Woche')
19
            ->setWeekMod(1)
0 ignored issues
show
Bug introduced by
The method setWeekMod() does not exist on App\Entity\TimetableWeek. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

19
            ->/** @scrutinizer ignore-call */ setWeekMod(1)

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
20
        );
21
22
        $manager->persist(
23
            (new TimetableWeek())
24
            ->setKey('B')
25
            ->setDisplayName('B-Woche')
26
            ->setWeekMod(0)
27
        );
28
29
        $manager->flush();
30
    }
31
}