@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | public function __construct( |
| 32 | 32 | private readonly ConfiguratorInterface $config, |
| 33 | - ) { |
|
| 33 | + ){ |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | public function init(EnvironmentInterface $env): void |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | private function initInstantiator(AttributesConfig $config): InstantiatorInterface |
| 49 | 49 | { |
| 50 | - if ($config->isAnnotationsReaderEnabled()) { |
|
| 50 | + if ($config->isAnnotationsReaderEnabled()){ |
|
| 51 | 51 | return new Facade(); |
| 52 | 52 | } |
| 53 | 53 | |
@@ -62,15 +62,15 @@ discard block |
||
| 62 | 62 | ): ReaderInterface { |
| 63 | 63 | $reader = new AttributeReader($instantiator); |
| 64 | 64 | |
| 65 | - if ($container->has(CacheInterface::class)) { |
|
| 65 | + if ($container->has(CacheInterface::class)){ |
|
| 66 | 66 | $cache = $container->get(CacheInterface::class); |
| 67 | 67 | \assert($cache instanceof CacheInterface); |
| 68 | 68 | |
| 69 | 69 | $reader = new Psr16CachedReader($reader, $cache); |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | - if ($config->isAnnotationsReaderEnabled()) { |
|
| 73 | - if (!\interface_exists(DoctrineReaderInterface::class)) { |
|
| 72 | + if ($config->isAnnotationsReaderEnabled()){ |
|
| 73 | + if (!\interface_exists(DoctrineReaderInterface::class)){ |
|
| 74 | 74 | throw new InitializationException( |
| 75 | 75 | 'Doctrine annotations reader is not available, please install "doctrine/annotations" package', |
| 76 | 76 | ); |
@@ -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 | ); |