@@ -160,7 +160,7 @@ private function buildKnp(FormBuilderInterface $builder, array $options): void
160160
161161 $ localeFormBuilder = $ builder ->create ($ locale , FormType::class, [
162162 'data_class ' => $ options ['translation_class ' ],
163- 'setter ' => static fn (...$ args ) => self ::knpLocaleSetter ($ locale , $ required , ...$ args ), // @phpstan-ignore argument.unpackNonIterable, argument. type
163+ 'setter ' => static fn (...$ args ) => self ::knpLocaleSetter ($ locale , $ required , ...$ args ), // @phpstan-ignore argument.type
164164 // LocaleExtension options process
165165 'label ' => $ options ['locale_labels ' ][$ locale ] ?? null ,
166166 'required ' => $ required ,
@@ -201,8 +201,8 @@ private function buildGedmo(FormBuilderInterface $builder, array $options): void
201201 ? [
202202 'inherit_data ' => true ,
203203 ] : [
204- 'getter ' => static fn (...$ args ) => self ::gedmoLocaleGetter ($ locale , ...$ args ), // @phpstan-ignore argument.unpackNonIterable, argument. type
205- 'setter ' => static fn (...$ args ) => self ::gedmoLocaleSetter (...$ args ), // @phpstan-ignore argument.unpackNonIterable, argument. type
204+ 'getter ' => static fn (...$ args ) => self ::gedmoLocaleGetter ($ locale , ...$ args ), // @phpstan-ignore argument.type
205+ 'setter ' => static fn (...$ args ) => self ::gedmoLocaleSetter (...$ args ), // @phpstan-ignore argument.type
206206 ]
207207 ),
208208 // LocaleExtension options process
@@ -222,7 +222,7 @@ private function buildGedmo(FormBuilderInterface $builder, array $options): void
222222 $ field = $ builtChild ->getName ();
223223 $ localeFormBuilder ->add ($ builtChild ->getName (), $ builtChild ->getType ()->getInnerType ()::class, [
224224 ...$ builtChild ->getFormConfig ()->getOptions (),
225- 'getter ' => static fn (...$ args ) => self ::gedmoFieldGetter ($ field , ...$ args ), // @phpstan-ignore argument.unpackNonIterable, argument. type
225+ 'getter ' => static fn (...$ args ) => self ::gedmoFieldGetter ($ field , ...$ args ), // @phpstan-ignore argument.type
226226 'setter ' => static fn (array &$ translations , ?string $ data ) => self ::gedmoFieldSetter ($ field , $ locale , $ translationClass , $ translations , $ data ), // @phpstan-ignore-line
227227 // 'property_path' => sprintf('[%s?].content', $field),
228228 ]);
@@ -233,8 +233,8 @@ private function buildGedmo(FormBuilderInterface $builder, array $options): void
233233 }
234234
235235 /**
236- * @param Collection<int , \Stub\KnpTranslation> $translationColl
237- * @param ?\Stub\KnpTranslation $translation
236+ * @param Collection<array-key , \Stub\KnpTranslation> $translationColl
237+ * @param ?\Stub\KnpTranslation $translation
238238 */
239239 private static function knpLocaleSetter (string $ locale , bool $ required , Collection $ translationColl , ?object $ translation ): void
240240 {
@@ -249,7 +249,7 @@ private static function knpLocaleSetter(string $locale, bool $required, Collecti
249249 }
250250
251251 $ translation ->setLocale ($ locale );
252- $ translationColl ->add ( $ translation );
252+ $ translationColl ->set ( $ locale , $ translation );
253253 }
254254
255255 /**
0 commit comments