File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,9 @@ final class UserInput
137137
138138final class UserListController
139139{
140+ /**
141+ * @param list<UserInput > $users
142+ */
140143 public function updateUsers(
141144 #[Input(item: UserInput::class)] array $users // Array of UserInput objects
142145 ) {
@@ -145,6 +148,9 @@ final class UserListController
145148 }
146149 }
147150
151+ /**
152+ * @param ArrayObject<int , UserInput > $users
153+ */
148154 public function processUsers(
149155 #[Input(item: UserInput::class)] ArrayObject $users // ArrayObject collection
150156 ) {
@@ -212,6 +218,10 @@ $data = [
212218];
213219
214220// In your controller
221+ /**
222+ * @param list<string > $hobbies
223+ * @param list<string > $categories
224+ */
215225public function updatePreferences(
216226 #[Input] array $hobbies, // Simple string array
217227 #[Input] array $categories // Simple string array
@@ -240,6 +250,9 @@ final class UserCollection extends ArrayObject
240250 }
241251}
242252
253+ /**
254+ * @param array<UserInput > $users
255+ */
243256public function handleUsers(
244257 #[Input(item: UserInput::class)] UserCollection $users
245258) {
You can’t perform that action at this time.
0 commit comments