Skip to content

Commit 46ead59

Browse files
committed
Merge branch '5.4' into 6.2
* 5.4: Update data_transformers.rst
2 parents 9f8ca28 + 8d12753 commit 46ead59

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

form/data_transformers.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ class::
7878

7979
$builder->get('tags')
8080
->addModelTransformer(new CallbackTransformer(
81-
function ($tagsAsArray) {
81+
function ($tagsAsArray): string {
8282
// transform the array to a string
8383
return implode(', ', $tagsAsArray);
8484
},
85-
function ($tagsAsString) {
85+
function ($tagsAsString): array {
8686
// transform the string back to an array
8787
return explode(', ', $tagsAsString);
8888
}

0 commit comments

Comments
 (0)