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