Skip to content

Commit ff119bc

Browse files
committed
added regression test
1 parent 5bf9a1d commit ff119bc

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

tests/PHPStan/Rules/Properties/TypesAssignedToPropertiesRuleTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,4 +918,11 @@ public function testBug2888(): void
918918
]);
919919
}
920920

921+
public function testBug11777(): void
922+
{
923+
$this->checkExplicitMixed = true;
924+
$this->checkImplicitMixed = true;
925+
$this->analyse([__DIR__ . '/data/bug-11777.php'], []);
926+
}
927+
921928
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
namespace Bug11777;
4+
5+
class HelloWorld {
6+
/** @var array<int, resource> */
7+
private array $pipes;
8+
9+
public function sayHello(string $cmd): void {
10+
proc_open($cmd, [0 => ['pipe', 'r']], $this->pipes);
11+
}
12+
}

0 commit comments

Comments
 (0)