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

LoadContainerWidgetsData   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 27
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A load() 0 16 2
A getOrder() 0 4 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
class LoadContainerWidgetsData extends AbstractFixture implements FixtureInterface, OrderedFixtureInterface
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.'/WidgetModel.yml',
35
                ],
36
                $manager,
37
                [
38 7
                    'providers' => [$this],
39
                ]
40
            );
41
        }
42 7
    }
43
44 7
    public function getOrder()
45
    {
46 7
        return 3;
47
    }
48
}
49