| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | public static function create(CacheItemPoolInterface $pool = null) |
||
| 30 | { |
||
| 31 | $classMetadataFactory = new ClassMetadataFactory(new DirectoryClassMetadataLoader(__DIR__)); |
||
| 32 | |||
| 33 | if (null !== $pool) { |
||
| 34 | $classMetadataFactory = new CacheClassMetadataFactory($classMetadataFactory, $pool); |
||
| 35 | } |
||
| 36 | |||
| 37 | return new Serializer(new Navigator(TypeRegistry::create([ |
||
| 38 | Type::OBJECT => new ObjectType($classMetadataFactory), |
||
| 39 | ]))); |
||
| 42 |