| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 22 | 
| Code Lines | 15 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 11 | 
| CRAP Score | 2.0023 | 
| Changes | 4 | ||
| Bugs | 1 | Features | 0 | 
| 1 | <?php | ||
| 40 | 45 | public function generate( | |
| 41 | LoaderInterface $loader, | ||
| 42 | FixturesLoaderInterface $fixturesLoader, | ||
| 43 | array $bundles, | ||
| 44 | $environment | ||
| 45 |     ) { | ||
| 46 | 45 |         if (!$loader instanceof Loader) { | |
| 47 |             throw new \UnexpectedValueException('Unsupported loader for this generator. Must be an instance of Hautelook\AliceBundle\Alice\DataFixtures\Loader.'); | ||
| 48 | } | ||
| 49 | |||
| 50 | 45 | $doctrineDataLoaders = $this->fixturesFinder->getDataLoaders($bundles, $environment); | |
| 51 | |||
| 52 | 45 | $_fixturesLoader = clone $fixturesLoader; | |
| 53 | 45 | $_fixturesLoader->addProvider($doctrineDataLoaders); | |
| 54 | |||
| 55 | 45 | return new Loader( | |
| 56 | 45 | $_fixturesLoader, | |
| 57 | 45 | $loader->getProcessorChain(), | |
| 58 | 45 | $loader->getPersistOnce(), | |
| 59 | 45 | $loader->getLoadingLimit() | |
| 60 | 45 | ); | |
| 61 | } | ||
| 62 | } | ||
| 63 |