@@ -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 ("mixed~(0|0.0|false|null) " , $ this ->config ['authors ' ]);
21+ assertType ("array|Traversable " , $ this ->config ['authors ' ]);
2222
2323 if (!is_array ($ author )) {
2424 $ this ->errors [] = 'authors. ' .$ key .' : should be an array, ' .gettype ($ author ).' given ' ;
25- assertType ("mixed~(0|0.0|false|null) " , $ this ->config ['authors ' ]);
25+ assertType ("array|Traversable " , $ this ->config ['authors ' ]);
2626 unset($ this ->config ['authors ' ][$ key ]);
27- assertType ("mixed~(0|0.0|false|null) " , $ this ->config ['authors ' ]);
27+ assertType ("array|Traversable " , $ this ->config ['authors ' ]);
2828 continue ;
2929 }
30- assertType ("mixed~(0|0.0|false|null) " , $ this ->config ['authors ' ]);
30+ assertType ("array|Traversable " , $ 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 ("mixed~(0|0.0|false|null) " , $ this ->config ['authors ' ]);
38+ assertType ("array|Traversable " , $ this ->config ['authors ' ]);
3939 unset($ this ->config ['authors ' ][$ key ]['homepage ' ]);
40- assertType ("array|ArrayAccess|string " , $ this ->config ['authors ' ]);
40+ assertType ("array|Traversable " , $ this ->config ['authors ' ]);
4141 }
4242 if (isset ($ author ['email ' ]) && !filter_var ($ author ['email ' ], FILTER_VALIDATE_EMAIL )) {
4343 unset($ this ->config ['authors ' ][$ key ]['email ' ]);
@@ -47,8 +47,8 @@ public function doFoo(): void
4747 }
4848 }
4949
50- assertType ("non-empty-array&hasOffsetValue('authors', mixed~(0|0.0|false|null)) " , $ this ->config );
51- assertType ("mixed~(0|0.0|false|null) " , $ this ->config ['authors ' ]);
50+ assertType ("non-empty-array&hasOffsetValue('authors', mixed~(0|0.0|''|'0'|array{}| false|null)) " , $ this ->config );
51+ assertType ("mixed~(0|0.0|''|'0'|array{}| false|null) " , $ this ->config ['authors ' ]);
5252
5353 if (empty ($ this ->config ['authors ' ])) {
5454 unset($ this ->config ['authors ' ]);
@@ -57,7 +57,7 @@ public function doFoo(): void
5757 assertType ("non-empty-array&hasOffsetValue('authors', mixed~(0|0.0|''|'0'|array{}|false|null)) " , $ this ->config );
5858 }
5959
60- assertType (' array ' , $ this ->config );
60+ assertType (" non-empty- array&hasOffsetValue('authors', mixed~(0|0.0|''|'0'|array{}|false|null)) " , $ this ->config );
6161 }
6262 }
6363
0 commit comments