@@ -23,7 +23,7 @@ public function inputTypes(int $i, float $f, string $s) {
23
23
24
24
public function specifiers (int $ i ) {
25
25
// https://3v4l.org/fmVIg
26
- assertType ('non-falsy -string ' , sprintf ('%14s ' , $ i ));
26
+ assertType ('numeric -string ' , sprintf ('%14s ' , $ i ));
27
27
28
28
assertType ('numeric-string ' , sprintf ('%d ' , $ i ));
29
29
@@ -45,9 +45,15 @@ public function specifiers(int $i) {
45
45
46
46
}
47
47
48
- public function positionalArgs ($ mixed , int $ i , float $ f , string $ s ) {
48
+ /**
49
+ * @param positive-int $posInt
50
+ * @param negative-int $negInt
51
+ */
52
+ public function positionalArgs ($ mixed , int $ i , float $ f , string $ s , int $ posInt , int $ negInt ) {
49
53
// https://3v4l.org/vVL0c
50
- assertType ('non-falsy-string ' , sprintf ('%2$14s ' , $ mixed , $ i ));
54
+ assertType ('numeric-string ' , sprintf ('%2$14s ' , $ mixed , $ i ));
55
+ assertType ('non-falsy-string&numeric-string ' , sprintf ('%2$14s ' , $ mixed , $ posInt ));
56
+ assertType ('non-falsy-string&numeric-string ' , sprintf ('%2$14s ' , $ mixed , $ negInt ));
51
57
52
58
assertType ('numeric-string ' , sprintf ('%2$.14F ' , $ mixed , $ i ));
53
59
assertType ('numeric-string ' , sprintf ('%2$.14F ' , $ mixed , $ f ));
0 commit comments