@@ -18,26 +18,26 @@ public function doFoo(): void
1818 if (!empty ($ this ->config ['authors ' ])) {
1919 assertType ("mixed~(0|0.0|''|'0'|array{}|false|null) " , $ this ->config ['authors ' ]);
2020 foreach ($ this ->config ['authors ' ] as $ key => $ author ) {
21- assertType ("array|Traversable " , $ this ->config ['authors ' ]);
21+ assertType ("iterable " , $ this ->config ['authors ' ]);
2222
2323 if (!is_array ($ author )) {
2424 $ this ->errors [] = 'authors. ' .$ key .' : should be an array, ' .gettype ($ author ).' given ' ;
25- assertType ("array|Traversable " , $ this ->config ['authors ' ]);
25+ assertType ("iterable " , $ this ->config ['authors ' ]);
2626 unset($ this ->config ['authors ' ][$ key ]);
27- assertType ("array|Traversable " , $ this ->config ['authors ' ]);
27+ assertType ("iterable " , $ this ->config ['authors ' ]);
2828 continue ;
2929 }
30- assertType ("array|Traversable " , $ this ->config ['authors ' ]);
30+ assertType ("iterable " , $ this ->config ['authors ' ]);
3131 foreach (['homepage ' , 'email ' , 'name ' , 'role ' ] as $ authorData ) {
3232 if (isset ($ author [$ authorData ]) && !is_string ($ author [$ authorData ])) {
3333 $ this ->errors [] = 'authors. ' .$ key .'. ' .$ authorData .' : invalid value, must be a string ' ;
3434 unset($ this ->config ['authors ' ][$ key ][$ authorData ]);
3535 }
3636 }
3737 if (isset ($ author ['homepage ' ])) {
38- assertType ("array|Traversable " , $ this ->config ['authors ' ]);
38+ assertType ("iterable " , $ this ->config ['authors ' ]);
3939 unset($ this ->config ['authors ' ][$ key ]['homepage ' ]);
40- assertType ("array|Traversable " , $ this ->config ['authors ' ]);
40+ assertType ("iterable " , $ this ->config ['authors ' ]);
4141 }
4242 if (isset ($ author ['email ' ]) && !filter_var ($ author ['email ' ], FILTER_VALIDATE_EMAIL )) {
4343 unset($ this ->config ['authors ' ][$ key ]['email ' ]);
0 commit comments