Skip to content

Commit 4489229

Browse files
committed
1 parent 04581b1 commit 4489229

4 files changed

Lines changed: 32 additions & 0 deletions

File tree

‎tests/PHPStan/Analyser/LooseConstComparisonPhp7Test.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public static function dataFileAsserts(): iterable
1313
// compares constants according to the php-version phpstan configuration,
1414
// _NOT_ the current php runtime version
1515
yield from self::gatherAssertTypes(__DIR__ . '/data/loose-const-comparison-php7.php');
16+
yield from self::gatherAssertTypes(__DIR__ . '/data/bug-11732-php7.php');
1617
}
1718

1819
/**

‎tests/PHPStan/Analyser/LooseConstComparisonPhp8Test.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public static function dataFileAsserts(): iterable
1313
// compares constants according to the php-version phpstan configuration,
1414
// _NOT_ the current php runtime version
1515
yield from self::gatherAssertTypes(__DIR__ . '/data/loose-const-comparison-php8.php');
16+
yield from self::gatherAssertTypes(__DIR__ . '/data/bug-11732-php8.php');
1617
}
1718

1819
/**
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php declare(strict_types = 1);
2+
3+
namespace Bug11732Php7;
4+
5+
use function PHPStan\Testing\assertType;
6+
7+
class HelloWorld
8+
{
9+
public function sayHello(): void
10+
{
11+
assertType('false', 0 === '');
12+
assertType('true', 0 == '');
13+
assertType('true', 0 <= '');
14+
}
15+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php declare(strict_types = 1);
2+
3+
namespace Bug11732Php8;
4+
5+
use function PHPStan\Testing\assertType;
6+
7+
class HelloWorld
8+
{
9+
public function sayHello(): void
10+
{
11+
assertType('false', 0 === '');
12+
assertType('false', 0 == '');
13+
assertType('false', 0 <= '');
14+
}
15+
}

0 commit comments

Comments
 (0)