Completed
Push — master ( f93802...a3beff )
by Paweł
34:14
created

LoadSeparateArticlesData::getOrder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 4
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
/*
4
 * This file is part of the Superdesk Web Publisher Fixtures Bundle.
5
 *
6
 * Copyright 2016 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 2016 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 Doctrine\Common\Persistence\ObjectManager;
20
use SWP\Bundle\FixturesBundle\AbstractFixture;
21
22 View Code Duplication
class LoadSeparateArticlesData extends AbstractFixture implements FixtureInterface, OrderedFixtureInterface
23
{
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function load(ObjectManager $manager)
28
    {
29
        $env = $this->getEnvironment();
30
31
        if ('test' === $env) {
32
            $this->loadFixtures(
33
                [
34
                    '@SWPFixturesBundle/Resources/fixtures/ORM/'.$env.'/separate_article.yml',
35
                ],
36
                $manager,
37
                [
38
                    'providers' => [$this],
39
                ]
40
            );
41
        }
42
    }
43
44
    /**
45
     * {@inheritdoc}
46
     */
47
    public function getOrder()
48
    {
49
        return 2;
50
    }
51
}
52