@@ -45,7 +45,7 @@ public function process(ContainerBuilder $container): void
45
45
$ type = $ tag ['type ' ];
46
46
47
47
if (isset ($ supportedStorageTypes [$ type ])) {
48
- throw new \LogicException (sprintf ('Data source type %1$s already provided by %2$s ' , $ type , $ reference ));
48
+ throw new \LogicException (\ sprintf ('Data source type %1$s already provided by %2$s ' , $ type , $ reference ));
49
49
}
50
50
51
51
/** @var class-string<StorageWithOptions> $class */
@@ -69,7 +69,7 @@ public function process(ContainerBuilder $container): void
69
69
foreach ($ configuredDatabases as $ name => $ database ) {
70
70
$ type = $ database ['storage ' ];
71
71
if (\array_key_exists ($ type , $ supportedStorageTypes ) === false ) {
72
- throw new \LogicException (sprintf ('Unsupported type "%1$s" at "sigwin_yassg.data_sources.%2$s", allowed values: %3$s ' , $ type , $ name , implode (', ' , array_keys ($ supportedStorageTypes ))));
72
+ throw new \LogicException (\ sprintf ('Unsupported type "%1$s" at "sigwin_yassg.data_sources.%2$s", allowed values: %3$s ' , $ type , $ name , implode (', ' , array_keys ($ supportedStorageTypes ))));
73
73
}
74
74
75
75
$ databaseClass = ltrim ($ database ['class ' ], '\\' );
@@ -84,23 +84,23 @@ public function process(ContainerBuilder $container): void
84
84
try {
85
85
$ options = $ callable ($ database ['options ' ] ?? []);
86
86
} catch (OptionsResolverException $ resolverException ) {
87
- throw new \LogicException (sprintf ('Options issue at "sigwin_yassg.data_sources.%1$s.options": %2$s ' , $ name , $ resolverException ->getMessage ()));
87
+ throw new \LogicException (\ sprintf ('Options issue at "sigwin_yassg.data_sources.%1$s.options": %2$s ' , $ name , $ resolverException ->getMessage ()));
88
88
}
89
89
foreach ($ options as $ key => $ value ) {
90
90
$ storageDefinition ->setArgument ('$ ' .$ key , $ value );
91
91
}
92
- $ storageId = sprintf ('sigwin_yassg.database.storage.%1$s ' , $ name );
92
+ $ storageId = \ sprintf ('sigwin_yassg.database.storage.%1$s ' , $ name );
93
93
$ container ->setDefinition ($ storageId , $ storageDefinition );
94
94
95
95
$ denormalizerDefinition = new Definition (Storage \DenormalizingStorage::class);
96
96
$ denormalizerDefinition ->setDecoratedService ($ storageId );
97
97
$ denormalizerDefinition
98
98
->setArgument (0 , new Reference ('serializer ' ))
99
- ->setArgument (1 , new Reference (sprintf ('sigwin_yassg.database.storage_denormalizer.%1$s.inner ' , $ name )))
99
+ ->setArgument (1 , new Reference (\ sprintf ('sigwin_yassg.database.storage_denormalizer.%1$s.inner ' , $ name )))
100
100
->setArgument (2 , $ databaseClass )
101
101
->setArgument (3 , new Reference (\Sigwin \YASSG \Context \LocaleContext::class))
102
102
;
103
- $ container ->setDefinition (sprintf ('sigwin_yassg.database.storage_denormalizer.%1$s ' , $ name ), $ denormalizerDefinition );
103
+ $ container ->setDefinition (\ sprintf ('sigwin_yassg.database.storage_denormalizer.%1$s ' , $ name ), $ denormalizerDefinition );
104
104
105
105
$ databaseDefinition = new Definition (MemoryDatabase::class);
106
106
$ databaseDefinition
@@ -114,9 +114,9 @@ public function process(ContainerBuilder $container): void
114
114
->setArgument (3 , $ database ['page_limit ' ])
115
115
->addTag ('sigwin_yassg.database ' , ['name ' => $ name ])
116
116
;
117
- $ databaseId = sprintf ('sigwin_yassg.database.%1$s ' , $ name );
117
+ $ databaseId = \ sprintf ('sigwin_yassg.database.%1$s ' , $ name );
118
118
$ container ->setDefinition ($ databaseId , $ databaseDefinition );
119
- $ container ->setAlias (sprintf ('%1$s $%2$s ' , Database::class, $ name ), $ databaseId );
119
+ $ container ->setAlias (\ sprintf ('%1$s $%2$s ' , Database::class, $ name ), $ databaseId );
120
120
121
121
$ cachingDatabaseDefinition = new Definition (Database \CachingDatabase::class);
122
122
$ cachingDatabaseDefinition
@@ -127,7 +127,7 @@ public function process(ContainerBuilder $container): void
127
127
->setAutoconfigured (true )
128
128
->setDecoratedService ($ databaseId )
129
129
;
130
- $ container ->setDefinition (sprintf ('sigwin_yassg.database.cached.%1$s ' , $ name ), $ cachingDatabaseDefinition );
130
+ $ container ->setDefinition (\ sprintf ('sigwin_yassg.database.cached.%1$s ' , $ name ), $ cachingDatabaseDefinition );
131
131
132
132
$ localizableProperties = $ this ->getLocalizableProperties ($ databaseClass );
133
133
if ($ localizableProperties !== []) {
0 commit comments