@@ -47,7 +47,8 @@ discard block |
||
47 | 47 | |
48 | 48 | private function initInstantiator(AttributesConfig $config): InstantiatorInterface |
49 | 49 | { |
50 | - if ($config->isAnnotationsReaderEnabled()) { |
|
50 | + if ($config->isAnnotationsReaderEnabled()) |
|
51 | + { |
|
51 | 52 | return new Facade(); |
52 | 53 | } |
53 | 54 | |
@@ -62,15 +63,18 @@ discard block |
||
62 | 63 | ): ReaderInterface { |
63 | 64 | $reader = new AttributeReader($instantiator); |
64 | 65 | |
65 | - if ($container->has(CacheInterface::class)) { |
|
66 | + if ($container->has(CacheInterface::class)) |
|
67 | + { |
|
66 | 68 | $cache = $container->get(CacheInterface::class); |
67 | 69 | \assert($cache instanceof CacheInterface); |
68 | 70 | |
69 | 71 | $reader = new Psr16CachedReader($reader, $cache); |
70 | 72 | } |
71 | 73 | |
72 | - if ($config->isAnnotationsReaderEnabled()) { |
|
73 | - if (!\interface_exists(DoctrineReaderInterface::class)) { |
|
74 | + if ($config->isAnnotationsReaderEnabled()) |
|
75 | + { |
|
76 | + if (!\interface_exists(DoctrineReaderInterface::class)) |
|
77 | + { |
|
74 | 78 | throw new InitializationException( |
75 | 79 | 'Doctrine annotations reader is not available, please install "doctrine/annotations" package', |
76 | 80 | ); |