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 (#220)
by Eric
37:59 queued 34:57
created

CommandFactory::createCommand()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 21
Code Lines 18

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 10
CRAP Score 1

Importance

Changes 5
Bugs 1 Features 2
Metric Value
c 5
b 1
f 2
dl 0
loc 21
ccs 10
cts 10
cp 1
rs 9.3142
cc 1
eloc 18
nc 1
nop 8
crap 1

How to fix   Many Parameters   

Many Parameters

Methods with many parameters are not only hard to understand, but their parameters also often become inconsistent when you need more, or different data.

There are several approaches to avoid long parameter lists:

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\Doctrine\Command;
13
14
use Doctrine\Common\Persistence\ManagerRegistry;
15
use Hautelook\AliceBundle\Alice\DataFixtures\Fixtures\LoaderInterface as FixturesLoaderInterface;
16
use Hautelook\AliceBundle\Alice\DataFixtures\LoaderInterface;
17
use Hautelook\AliceBundle\Doctrine\DataFixtures\Executor\FixturesExecutorInterface;
18
use Hautelook\AliceBundle\Doctrine\Generator\LoaderGeneratorInterface;
19
use Hautelook\AliceBundle\Finder\FixturesFinderInterface;
20
use Hautelook\AliceBundle\Resolver\BundlesResolverInterface;
21
22
/**
23
 * Factory class to generate Doctrine load data fixtures commands.
24
 *
25
 * @author Théo FIDRY <[email protected]>
26
 */
27
class CommandFactory
28
{
29
    /**
30
     * @param string                    $name             Command name
31
     * @param ManagerRegistry           $doctrine
32
     * @param LoaderInterface           $loader
33
     * @param FixturesLoaderInterface   $fixturesLoader
34
     * @param FixturesFinderInterface   $fixturesFinder
35
     * @param BundlesResolverInterface  $bundlesResolver
36
     * @param LoaderGeneratorInterface  $loaderGenerator
37
     * @param FixturesExecutorInterface $fixturesExecutor
38
     *
39
     * @return LoadDataFixturesCommand
40
     */
41 120
    public function createCommand(
42
        $name,
43
        ManagerRegistry $doctrine,
44
        LoaderInterface $loader,
45
        FixturesLoaderInterface $fixturesLoader,
46
        FixturesFinderInterface $fixturesFinder,
47
        BundlesResolverInterface $bundlesResolver,
48
        LoaderGeneratorInterface $loaderGenerator,
49
        FixturesExecutorInterface $fixturesExecutor
50
    ) {
51 120
        return new LoadDataFixturesCommand(
52 120
            $name,
53 120
            $doctrine,
54 120
            $loader,
55 120
            $fixturesLoader,
56 120
            $fixturesFinder,
57 120
            $bundlesResolver,
58 120
            $loaderGenerator,
59
            $fixturesExecutor
60 120
        );
61
    }
62
}
63