Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2.0625 |
Changes | 0 |
1 | <?php |
||
34 | 1052 | public static function create(CacheItemPoolInterface $pool = null) |
|
35 | { |
||
36 | 1052 | $classMetadataFactory = new ClassMetadataFactory(new DirectoryClassMetadataLoader(__DIR__)); |
|
37 | |||
38 | 1052 | if ($pool !== null) { |
|
39 | $classMetadataFactory = new CacheClassMetadataFactory($classMetadataFactory, $pool); |
||
40 | } |
||
41 | |||
42 | 1052 | return new Serializer(new Navigator(TypeRegistry::create([ |
|
43 | 1052 | Type::OBJECT => new ObjectType($classMetadataFactory), |
|
44 | 526 | ]))); |
|
45 | } |
||
46 | } |
||
47 |