Skip to content

Commit fbdec4a

Browse files
committed
Regression test
Closes phpstan/phpstan#7138
1 parent 0a3824f commit fbdec4a

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,4 +1133,12 @@ public function testBug7676(): void
11331133
$this->analyse([__DIR__ . '/data/bug-7676.php'], []);
11341134
}
11351135

1136+
public function testBug7138(): void
1137+
{
1138+
if (PHP_VERSION_ID < 80100) {
1139+
$this->markTestSkipped('Test requires PHP 8.1');
1140+
}
1141+
$this->analyse([__DIR__ . '/data/bug-7138.php'], []);
1142+
}
1143+
11361144
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
namespace Bug7138;
4+
5+
function test(): \PgSql\Result|false {
6+
$connect = \pg_connect('');
7+
if ($connect === false) {
8+
return false;
9+
}
10+
11+
return \pg_query($connect, '');
12+
}

0 commit comments

Comments
 (0)