Completed
Push — master ( 3460d4...501fc3 )
by Paweł
76:02 queued 29:07
created

LoadContainersData::getOrder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 4
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
/*
4
 * This file is part of the Superdesk Web Publisher Fixtures Bundle.
5
 *
6
 * Copyright 2015 Sourcefabric z.ú. and contributors.
7
 *
8
 * For the full copyright and license information, please see the
9
 * AUTHORS and LICENSE files distributed with this source code.
10
 *
11
 * @copyright 2015 Sourcefabric z.ú
12
 * @license http://www.superdesk.org/license
13
 */
14
15
namespace SWP\Bundle\FixturesBundle\DataFixtures\ORM;
16
17
use Doctrine\Common\DataFixtures\FixtureInterface;
18
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
19
use SWP\Bundle\FixturesBundle\AbstractFixture;
20
use Doctrine\Common\Persistence\ObjectManager;
21
22 View Code Duplication
class LoadContainersData extends AbstractFixture implements FixtureInterface, OrderedFixtureInterface
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
23
{
24
    /**
25
     * {@inheritdoc}
26
     */
27 7
    public function load(ObjectManager $manager)
28
    {
29 7
        $env = $this->getEnvironment();
30
31 7
        if ('test' === $env) {
32 7
            $this->loadFixtures(
33
                [
34 7
                    '@SWPFixturesBundle/Resources/fixtures/ORM/'.$env.'/Container.yml',
35
                ],
36
                $manager
37
            );
38
        }
39 7
    }
40
41 7
    public function getOrder()
42
    {
43 7
        return 1;
44
    }
45
}
46