@@ -19,22 +19,22 @@ public function doFoo(): void
1919 foreach ($ this ->config ['authors ' ] as $ key => $ author ) {
2020 if (!is_array ($ author )) {
2121 $ this ->errors [] = 'authors. ' .$ key .' : should be an array, ' .gettype ($ author ).' given ' ;
22- assertType ("mixed " , $ this ->config ['authors ' ]);
22+ assertType ("mixed~(0|0.0|''|'0'|false) " , $ this ->config ['authors ' ]);
2323 unset($ this ->config ['authors ' ][$ key ]);
24- assertType ("mixed " , $ this ->config ['authors ' ]);
24+ assertType ("mixed~(0|0.0|''|'0'|false) " , $ this ->config ['authors ' ]);
2525 continue ;
2626 }
27- assertType ("mixed " , $ this ->config ['authors ' ]);
27+ assertType ("mixed~(0|0.0|''|'0'|false) " , $ this ->config ['authors ' ]);
2828 foreach (['homepage ' , 'email ' , 'name ' , 'role ' ] as $ authorData ) {
2929 if (isset ($ author [$ authorData ]) && !is_string ($ author [$ authorData ])) {
3030 $ this ->errors [] = 'authors. ' .$ key .'. ' .$ authorData .' : invalid value, must be a string ' ;
3131 unset($ this ->config ['authors ' ][$ key ][$ authorData ]);
3232 }
3333 }
3434 if (isset ($ author ['homepage ' ])) {
35- assertType ("mixed " , $ this ->config ['authors ' ]);
35+ assertType ("mixed~(0|0.0|''|'0'|false) " , $ this ->config ['authors ' ]);
3636 unset($ this ->config ['authors ' ][$ key ]['homepage ' ]);
37- assertType ("mixed " , $ this ->config ['authors ' ]);
37+ assertType ("array|ArrayAccess|null " , $ this ->config ['authors ' ]);
3838 }
3939 if (isset ($ author ['email ' ]) && !filter_var ($ author ['email ' ], FILTER_VALIDATE_EMAIL )) {
4040 unset($ this ->config ['authors ' ][$ key ]['email ' ]);
@@ -44,8 +44,8 @@ public function doFoo(): void
4444 }
4545 }
4646
47- assertType ("non-empty-array&hasOffsetValue('authors', mixed) " , $ this ->config );
48- assertType ("mixed " , $ this ->config ['authors ' ]);
47+ assertType ("non-empty-array&hasOffsetValue('authors', mixed~(0|0.0|''|'0'|false) ) " , $ this ->config );
48+ assertType ("mixed~(0|0.0|''|'0'|false) " , $ this ->config ['authors ' ]);
4949
5050 if (empty ($ this ->config ['authors ' ])) {
5151 unset($ this ->config ['authors ' ]);
0 commit comments