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::loadFixture()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 7
cts 7
cp 1
rs 9.9332
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 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