Passed
Pull Request — master (#23)
by Nicolas
10:35
created

AbstractFixtures::getLoader()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Smart\AuthenticationBundle\DataFixtures;
4
5
use Doctrine\Bundle\FixturesBundle\Fixture;
6
use Fidry\AliceDataFixtures\Loader\PurgerLoader;
7
use Symfony\Component\DependencyInjection\ContainerInterface;
8
9
/**
10
 * Nicolas Bastien <[email protected]>.
11
 */
12
abstract class AbstractFixtures extends Fixture
13
{
14
    /**
15
     * @var ContainerInterface
16
     */
17
    protected $container;
18
19
    /**
20
     * @var string
21
     */
22
    protected $fixturesDir;
23
24
    public function __construct(ContainerInterface $container)
25
    {
26
        $this->container = $container;
27
    }
28
29
    /**
30
     * @return string
31
     */
32
    protected function getFixturesDir()
33
    {
34
        return $this->container->getParameter('kernel.project_dir').'/fixtures/';
35
    }
36
37
    /**
38
     * @return PurgerLoader
39
     */
40
    protected function getLoader()
41
    {
42
        return $this->container->get('fidry_alice_data_fixtures.loader.doctrine');
43
    }
44
}
45