Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2.686 |
Changes | 0 |
1 | <?php |
||
15 | 30 | public function createDriver( |
|
16 | array $metadataDirs, |
||
17 | Reader $annotationReader, |
||
18 | ClassMetadataUpdaterInterface $propertyUpdater = null |
||
19 | ) |
||
20 | { |
||
21 | 30 | $annotationDriver = new AnnotationDriver($annotationReader, $propertyUpdater); |
|
22 | 30 | if (empty($metadataDirs)) { |
|
23 | 30 | return $annotationDriver; |
|
24 | } |
||
25 | |||
26 | $fileLocator = new FileLocator($metadataDirs); |
||
27 | |||
28 | return new DriverChain(array( |
||
29 | new YamlDriver($fileLocator, $propertyUpdater), |
||
30 | new XmlDriver($fileLocator, $propertyUpdater), |
||
31 | $annotationDriver, |
||
32 | )); |
||
33 | } |
||
34 | } |
||
35 |