File tree Expand file tree Collapse file tree 4 files changed +45
-12
lines changed
tests/PHPStan/Analyser/nsrt Expand file tree Collapse file tree 4 files changed +45
-12
lines changed Original file line number Diff line number Diff line change 1+ <?php // lint >= 8.4
2+
3+ declare (strict_types = 1 );
4+
5+ namespace Bug12393Php84 ;
6+
7+ use function PHPStan \Testing \assertNativeType ;
8+ use function PHPStan \Testing \assertType ;
9+
10+
11+ class StringableFoo {
12+ private string $ foo ;
13+
14+ // https://3v4l.org/2SPPj#v8.4.6
15+ public function doFoo3 (\BcMath \Number $ foo ): void {
16+ $ this ->foo = $ foo ;
17+ assertType ('*NEVER* ' , $ this ->foo );
18+ }
19+
20+ public function __toString (): string {
21+ return 'Foo ' ;
22+ }
23+ }
Original file line number Diff line number Diff line change @@ -178,12 +178,6 @@ public function doFoo2(NotStringable $foo): void {
178178 assertType ('*NEVER* ' , $ this ->foo );
179179 }
180180
181- // https://3v4l.org/2SPPj#v8.4.6
182- public function doFoo3 (\BcMath \Number $ foo ): void {
183- $ this ->foo = $ foo ;
184- assertType ('*NEVER* ' , $ this ->foo );
185- }
186-
187181 public function __toString (): string {
188182 return 'Foo ' ;
189183 }
Original file line number Diff line number Diff line change 1+ <?php // lint >= 8.4
2+
3+ declare (strict_types = 0 );
4+
5+ namespace Bug12393bPhp84 ;
6+
7+ use function PHPStan \Testing \assertNativeType ;
8+ use function PHPStan \Testing \assertType ;
9+
10+ class StringableFoo {
11+ private string $ foo ;
12+
13+ // https://3v4l.org/nelJF#v8.4.6
14+ public function doFoo3 (\BcMath \Number $ foo ): void {
15+ $ this ->foo = $ foo ;
16+ assertType ('non-empty-string&numeric-string ' , $ this ->foo );
17+ }
18+
19+ public function __toString (): string {
20+ return 'Foo ' ;
21+ }
22+ }
Original file line number Diff line number Diff line change @@ -686,12 +686,6 @@ public function doFoo2(NotStringable $foo): void {
686686 assertType ('*NEVER* ' , $ this ->foo );
687687 }
688688
689- // https://3v4l.org/nelJF#v8.4.6
690- public function doFoo3 (\BcMath \Number $ foo ): void {
691- $ this ->foo = $ foo ;
692- assertType ('non-empty-string&numeric-string ' , $ this ->foo );
693- }
694-
695689 public function __toString (): string {
696690 return 'Foo ' ;
697691 }
You can’t perform that action at this time.
0 commit comments