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 — 1.x (#218)
by Eric
12:08
created

Loader   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 5
Bugs 3 Features 1
Metric Value
wmc 3
c 5
b 3
f 1
lcom 0
cbo 2
dl 0
loc 42
ccs 10
cts 10
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getPersister() 0 4 1
A load() 0 8 1
1
<?php
2
3
/*
4
 * This file is part of the Hautelook\AliceBundle package.
5
 *
6
 * (c) Baldur Rensch <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Hautelook\AliceBundle\Alice\DataFixtures\Fixtures;
13
14
use Hautelook\AliceBundle\Faker\Provider\ProviderChain;
15
use Nelmio\Alice\PersisterInterface;
16
17
/**
18
 * Bridge for Alice's loader.
19
 *
20
 * @author Théo FIDRY <[email protected]>
21
 */
22
class Loader extends \Nelmio\Alice\Fixtures\Loader implements LoaderInterface
23
{
24
    /**
25
     * @param string        $locale
26
     * @param ProviderChain $providerChain
27
     * @param int           $seed
28
     * @param array         $parameters
29
     */
30 120
    public function __construct($locale = 'en_US', ProviderChain $providerChain, $seed = 1, array $parameters = [])
31
    {
32 120
        parent::__construct($locale, $providerChain->getProviders(), $seed, $parameters);
33 120
    }
34
35
    /**
36
     * Loads a fixture file.
37
     *
38
     * @param string|array $dataOrFilename May either be the path to the file in which case it will be parsed, or be
39
     *                                     an array of data (then skips the parsing). The format of the array of data
40
     *                                     depends of the builders used.
41
     * @param array        $references     Array where the key is the object name and the value the actual object
42
     *                                     class. The references are used to inject objects which the loader should be
43
     *                                     aware of while loading the file.
44
     *
45
     * @return array|\object[]
46
     */
47 78
    public function load($dataOrFilename, array $references = [])
48
    {
49 78
        $this->setReferences($references);
50 78
        $objects = parent::load($dataOrFilename);
51 78
        $this->setReferences([]);
52
53 78
        return $objects;
54
    }
55
56
    /**
57
     * @return PersisterInterface
58
     */
59 78
    public function getPersister()
60
    {
61 78
        return $this->manager;
62
    }
63
}
64