Skip to content

Commit b14719a

Browse files
committed
separated php 8.4 tests
1 parent 95186fe commit b14719a

File tree

4 files changed

+45
-12
lines changed

4 files changed

+45
-12
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
}

tests/PHPStan/Analyser/nsrt/bug-12393.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff 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
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
}

tests/PHPStan/Analyser/nsrt/bug-12393b.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)