Completed
Push — master ( e79dfa...ffecda )
by Benjamin
02:16
created

LoadAdminData::getOrder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace Alpixel\Bundle\UserBundle\DataFixtures\ORM;
3
4
use Doctrine\Common\DataFixtures\FixtureInterface;
5
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
6
use Doctrine\Common\Persistence\ObjectManager;
7
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8
use Symfony\Component\DependencyInjection\ContainerInterface;
9
10
class LoadAdminData implements FixtureInterface, ContainerAwareInterface, OrderedFixtureInterface
11
{
12
    /**
13
     * @var ContainerInterface
14
     */
15
    private $container;
16
17
    /**
18
     * {@inheritDoc}
19
     */
20
    public function setContainer(ContainerInterface $container = null)
21
    {
22
        $this->container = $container;
23
    }
24
25
    /**
26
     * {@inheritDoc}
27
     */
28
    public function load(ObjectManager $manager)
29
    {
30
        \Nelmio\Alice\Fixtures::load(__DIR__.'/../../Resources/fixtures/admin.yml', $manager);
31
    }
32
33
    public function getOrder()
34
    {
35
        return 1; // the order in which fixtures will be loaded
36
    }
37
}
38