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

LoadAdminData   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 28
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setContainer() 0 4 1
A load() 0 4 1
A getOrder() 0 4 1
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