Conditions | 4 |
Paths | 4 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
22 | 10 | public static function createManagerExecutor(ObjectManager $manager): AbstractExecutor |
|
23 | { |
||
24 | 10 | if ($manager instanceof EntityManagerInterface) { |
|
25 | 7 | return new ORMExecutor($manager, new ORMPurger($manager)); |
|
26 | } |
||
27 | |||
28 | 3 | if ($manager instanceof DocumentManagerInterface) { |
|
29 | 1 | return new PHPCRExecutor($manager, new PHPCRPurger($manager)); |
|
30 | } |
||
31 | |||
32 | 2 | if ($manager instanceof DocumentManager) { |
|
33 | 1 | return new MongoDBExecutor($manager, new MongoDBPurger($manager)); |
|
34 | } |
||
35 | |||
36 | 1 | throw new LogicException(sprintf('No fixture executor found for "%s".', get_class($manager))); |
|
37 | } |
||
38 | } |
||
39 |