@@ -1156,4 +1156,153 @@ public function looseCallable(
11561156assertType ('bool ' , $ callable$ unionStrings
11571157assertType ('bool ' , $ callable$ unionMaybeArray
11581158}
1159+ 
1160+ /** 
1161+  * @param callable $callable 
1162+  * @param true $true 
1163+  * @param false $false 
1164+  * @param 1 $one 
1165+  * @param 0 $zero 
1166+  * @param -1 $minusOne 
1167+  * @param '1' $oneStr 
1168+  * @param '0' $zeroStr 
1169+  * @param '-1' $minusOneStr 
1170+  * @param null $null 
1171+  * @param array{} $emptyArr 
1172+  * @param 'php' $phpStr 
1173+  * @param '' $emptyStr 
1174+  * @param array $arr 
1175+  * @param 'a'|'123'|'123.23' $unionMaybeNumeric 
1176+  * @param 1|2|3 $unionNumbers 
1177+  * @param 'a'|'b'|'c' $unionStrings 
1178+  * @param 'a'|'123'|123|array $unionMaybeArray 
1179+  * 
1180+  * https://3v4l.org/RHc0P 
1181+  */ 
1182+ public  function  looseUnion (
1183+ $ callable
1184+ $ true
1185+ $ false
1186+ $ one
1187+ $ zero
1188+ $ minusOne
1189+ $ oneStr
1190+ $ zeroStr
1191+ $ minusOneStr
1192+ $ null
1193+ $ emptyArr
1194+ $ phpStr
1195+ $ emptyStr
1196+ array  $ arr
1197+ int  $ int
1198+ float  $ float
1199+ bool  $ bool
1200+ string  $ string
1201+ object $ obj
1202+ $ unionMaybeNumeric
1203+ $ unionNumbers
1204+ $ unionStrings
1205+ $ unionMaybeArray
1206+ ) {
1207+ assertType ('true ' , $ unionMaybeNumeric$ true
1208+ assertType ('false ' , $ unionMaybeNumeric$ false
1209+ assertType ('false ' , $ unionMaybeNumeric$ one
1210+ assertType ('false ' , $ unionMaybeNumeric$ zero
1211+ assertType ('false ' , $ unionMaybeNumeric10 );
1212+ assertType ('false ' , $ unionMaybeNumeric$ minusOne
1213+ assertType ('false ' , $ unionMaybeNumeric$ oneStr
1214+ assertType ('false ' , $ unionMaybeNumeric$ zeroStr
1215+ assertType ('false ' , $ unionMaybeNumeric$ minusOneStr
1216+ assertType ('false ' , $ unionMaybeNumeric$ null
1217+ assertType ('false ' , $ unionMaybeNumeric$ emptyArr
1218+ assertType ('false ' , $ unionMaybeNumeric$ phpStr
1219+ assertType ('false ' , $ unionMaybeNumeric$ emptyStr
1220+ assertType ('false ' , $ unionMaybeNumeric
1221+ assertType ('false ' , $ unionMaybeNumeric$ arr
1222+ assertType ('bool ' , $ unionMaybeNumeric$ int
1223+ assertType ('bool ' , $ unionMaybeNumeric$ float
1224+ assertType ('bool ' , $ unionMaybeNumeric$ bool
1225+ assertType ('bool ' , $ unionMaybeNumeric$ string
1226+ assertType ('false ' , $ unionMaybeNumeric$ obj
1227+ assertType ('false ' , $ unionMaybeNumericnew  \stdClass ());
1228+ assertType ('bool ' , $ unionMaybeNumeric$ unionNumbers
1229+ assertType ('bool ' , $ unionMaybeNumeric$ unionStrings
1230+ assertType ('bool ' , $ unionMaybeNumeric$ unionMaybeArray
1231+ 
1232+ assertType ('true ' , $ unionNumbers$ true
1233+ assertType ('false ' , $ unionNumbers$ false
1234+ assertType ('bool ' , $ unionNumbers$ one
1235+ assertType ('false ' , $ unionNumbers$ zero
1236+ assertType ('false ' , $ unionNumbers10 );
1237+ assertType ('false ' , $ unionNumbers$ minusOne
1238+ assertType ('bool ' , $ unionNumbers$ oneStr
1239+ assertType ('false ' , $ unionNumbers$ zeroStr
1240+ assertType ('false ' , $ unionNumbers$ minusOneStr
1241+ assertType ('false ' , $ unionNumbers$ null
1242+ assertType ('false ' , $ unionNumbers$ emptyArr
1243+ assertType ('false ' , $ unionNumbers$ phpStr
1244+ assertType ('false ' , $ unionNumbers$ emptyStr
1245+ assertType ('false ' , $ unionNumbers
1246+ assertType ('false ' , $ unionNumbers$ arr
1247+ assertType ('bool ' , $ unionNumbers$ int
1248+ assertType ('bool ' , $ unionNumbers$ float
1249+ assertType ('bool ' , $ unionNumbers$ bool
1250+ assertType ('bool ' , $ unionNumbers$ string
1251+ assertType ('bool ' , $ unionNumbers$ obj
1252+ assertType ('bool ' , $ unionNumbersnew  \stdClass ());
1253+ assertType ('bool ' , $ unionNumbers$ unionMaybeNumeric
1254+ assertType ('false ' , $ unionNumbers$ unionStrings
1255+ assertType ('bool ' , $ unionNumbers$ unionMaybeArray
1256+ 
1257+ assertType ('true ' , $ unionStrings$ true
1258+ assertType ('false ' , $ unionStrings$ false
1259+ assertType ('false ' , $ unionStrings$ one
1260+ assertType ('false ' , $ unionStrings$ zero
1261+ assertType ('false ' , $ unionStrings10 );
1262+ assertType ('false ' , $ unionStrings$ minusOne
1263+ assertType ('false ' , $ unionStrings$ oneStr
1264+ assertType ('false ' , $ unionStrings$ zeroStr
1265+ assertType ('false ' , $ unionStrings$ minusOneStr
1266+ assertType ('false ' , $ unionStrings$ null
1267+ assertType ('false ' , $ unionStrings$ emptyArr
1268+ assertType ('false ' , $ unionStrings$ phpStr
1269+ assertType ('false ' , $ unionStrings$ emptyStr
1270+ assertType ('false ' , $ unionStrings
1271+ assertType ('false ' , $ unionStrings$ arr
1272+ assertType ('bool ' , $ unionStrings$ int
1273+ assertType ('bool ' , $ unionStrings$ float
1274+ assertType ('bool ' , $ unionStrings$ bool
1275+ assertType ('bool ' , $ unionStrings$ string
1276+ assertType ('false ' , $ unionStrings$ obj
1277+ assertType ('false ' , $ unionStringsnew  \stdClass ());
1278+ assertType ('bool ' , $ unionStrings$ unionMaybeNumeric
1279+ assertType ('bool ' , $ unionStrings$ unionNumbers
1280+ assertType ('bool ' , $ unionStrings$ unionMaybeArray
1281+ 
1282+ assertType ('true ' , $ unionMaybeArray$ true
1283+ assertType ('false ' , $ unionMaybeArray$ false
1284+ assertType ('false ' , $ unionMaybeArray$ one
1285+ assertType ('false ' , $ unionMaybeArray$ zero
1286+ assertType ('false ' , $ unionMaybeArray10 );
1287+ assertType ('false ' , $ unionMaybeArray$ minusOne
1288+ assertType ('false ' , $ unionMaybeArray$ oneStr
1289+ assertType ('false ' , $ unionMaybeArray$ zeroStr
1290+ assertType ('false ' , $ unionMaybeArray$ minusOneStr
1291+ assertType ('false ' , $ unionMaybeArray$ null
1292+ assertType ('bool ' , $ unionMaybeArray$ emptyArr
1293+ assertType ('false ' , $ unionMaybeArray$ phpStr
1294+ assertType ('false ' , $ unionMaybeArray$ emptyStr
1295+ assertType ('bool ' , $ unionMaybeArray$ float
1296+ assertType ('bool ' , $ unionMaybeArray
1297+ assertType ('bool ' , $ unionMaybeArray$ arr
1298+ assertType ('bool ' , $ unionMaybeArray$ int
1299+ assertType ('bool ' , $ unionMaybeArray$ float
1300+ assertType ('bool ' , $ unionMaybeArray$ bool
1301+ assertType ('bool ' , $ unionMaybeArray$ string
1302+ assertType ('false ' , $ unionMaybeArray$ obj
1303+ assertType ('false ' , $ unionMaybeArraynew  \stdClass ());
1304+ assertType ('bool ' , $ unionMaybeArray$ unionMaybeNumeric
1305+ assertType ('bool ' , $ unionMaybeArray$ unionNumbers
1306+ assertType ('bool ' , $ unionMaybeArray$ unionStrings
1307+ }
11591308}
0 commit comments