GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

FixtureLoaderTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 3
dl 0
loc 16
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A loadFixture() 0 10 1
1
<?php
2
3
namespace Adrien\FixturesForTests;
4
5
use Doctrine\Common\DataFixtures\FixtureInterface;
6
use Doctrine\Common\DataFixtures\Loader;
7
use Doctrine\Common\DataFixtures\ReferenceRepository;
8
use Doctrine\Common\Persistence\ObjectManager;
9
10
trait FixtureLoaderTrait
11
{
12
    /** @var ReferenceRepository */
13
    protected $fixtureRepository;
14
15 6
    private function loadFixture(ObjectManager $manager, FixtureInterface ...$fixtures): void
0 ignored issues
show
Unused Code introduced by
This method is not used, and could be removed.
Loading history...
16
    {
17 6
        $executor = FixtureExecutorFactory::createManagerExecutor($manager);
18 6
        $this->fixtureRepository = $executor->getReferenceRepository();
19
20 6
        $loader = new Loader();
21 6
        array_map([$loader, 'addFixture'], $fixtures);
22
23 6
        $executor->execute($loader->getFixtures());
24 6
    }
25
}
26