Completed
Push — master ( a49823...664dd1 )
by Philip
23:56
created

ProxiedLoader::createFixture()   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 1
1
<?php
2
3
namespace App\DataFixtures;
4
5
use Doctrine\Bundle\FixturesBundle\Loader\SymfonyFixturesLoader;
6
use Doctrine\Common\DataFixtures\Loader;
7
8
class ProxiedLoader extends Loader
9
{
10
    /**
11
     * @var SymfonyFixturesLoader
12
     */
13
    private $proxyLoader;
14
15
    public function __construct(SymfonyFixturesLoader $proxyLoader)
16
    {
17
        $this->proxyLoader = $proxyLoader;
18
    }
19
20
    public function addByClass(string $fixtureClass)
21
    {
22
        $this->addFixture($this->proxyLoader->getFixture($fixtureClass));
23
    }
24
25
    protected function createFixture($class)
26
    {
27
        return $this->proxyLoader->getFixture($class);
28
    }
29
}
30