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.
Completed
Pull Request — master (#214)
by joseph
21:10
created

Loader::getFixtures()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 3
rs 10
ccs 0
cts 3
cp 0
crap 2
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\Entity\Testing\Fixtures;
4
5
use RuntimeException;
6
7
class Loader extends \Doctrine\Common\DataFixtures\Loader
8
{
9
    /**
10
     * @var FixturesHelper
11
     */
12
    private $fixturesHelper;
13
14
    /**
15
     * @param FixturesHelper $fixturesHelper
16
     *
17
     * @return Loader
18
     */
19
    public function setFixturesHelper(FixturesHelper $fixturesHelper): Loader
20
    {
21
        $this->fixturesHelper = $fixturesHelper;
22
23
        return $this;
24
    }
25
26
    protected function createFixture($class)
27
    {
28
        if (false === ($this->fixturesHelper instanceof FixturesHelper)) {
29
            throw new RuntimeException('Please call setFixturesHelper before using this method');
30
        }
31
32
        return $this->fixturesHelper->createFixture($class);
33
    }
34
}
35