Skip to content

Commit d2712cf

Browse files
committed
added regression test
1 parent 1592b6d commit d2712cf

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
@@ -928,4 +928,11 @@ public function testBug11241b(): void
928928
]);
929929
}
930930

931+
public function testBug11777(): void
932+
{
933+
$this->checkExplicitMixed = true;
934+
$this->checkImplicitMixed = true;
935+
$this->analyse([__DIR__ . '/data/bug-11777.php'], []);
936+
}
937+
931938
}
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)