Skip to content

Commit fe7e1f5

Browse files
authored
Merge branch refs/heads/1.12.x into 2.0.x
2 parents c11e98a + 9693201 commit fe7e1f5

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

tests/PHPStan/Rules/DeadCode/UnusedPrivatePropertyRuleTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,4 +307,11 @@ public function testBug10628(): void
307307
$this->analyse([__DIR__ . '/data/bug-10628.php'], []);
308308
}
309309

310+
public function testBug8781(): void
311+
{
312+
$this->alwaysWrittenTags = [];
313+
$this->alwaysReadTags = [];
314+
$this->analyse([__DIR__ . '/data/bug-8781.php'], []);
315+
}
316+
310317
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
namespace Bug8781;
4+
5+
class ExecSync
6+
{
7+
/**
8+
* @var array<mixed>
9+
*/
10+
private $stdOut;
11+
12+
/**
13+
* @var string
14+
*/
15+
private $command;
16+
17+
/**
18+
* @param string $command
19+
*/
20+
public function __construct($command)
21+
{
22+
$this->command = $command;
23+
}
24+
25+
public function run(): void
26+
{
27+
exec($this->command, $this->stdOut);
28+
}
29+
30+
/**
31+
* @return array<mixed>
32+
*/
33+
public function wait(): array
34+
{
35+
return $this->stdOut;
36+
}
37+
}

0 commit comments

Comments
 (0)