Completed
Push — master ( 3ef484...ea5778 )
by Paweł
08:46
created

LoadPackagesData::getOrder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SWP\Bundle\FixturesBundle\DataFixtures\ORM;
6
7
use Doctrine\Common\DataFixtures\FixtureInterface;
8
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
9
use Doctrine\Common\Persistence\ObjectManager;
10
use SWP\Bundle\FixturesBundle\AbstractFixture;
11
12
class LoadPackagesData extends AbstractFixture implements FixtureInterface, OrderedFixtureInterface
13
{
14
    /**
15
     * {@inheritdoc}
16
     */
17
    public function load(ObjectManager $manager)
18
    {
19
        $env = $this->getEnvironment();
20
21
        if ('test' === $env) {
22
            $this->loadFixtures(
23
                [
24
                    '@SWPFixturesBundle/Resources/fixtures/ORM/'.$env.'/package.yml',
25
                ],
26
                $manager,
27
                [
28
                    'providers' => [$this],
29
                ]
30
            );
31
        }
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37
    public function getOrder()
38
    {
39
        return 6;
40
    }
41
}
42