Skip to content

Commit

Permalink
Merge branch refs/heads/1.12.x into 2.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
phpstan-bot authored Dec 9, 2024
2 parents 89ddae6 + 09eab21 commit f9c7bbd
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/PHPStan/Analyser/AnalyserIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,12 @@ public function testArrayUnion(): void
$this->assertNoErrors($errors);
}

public function testBug6948(): void
{
$errors = $this->runAnalyse(__DIR__ . '/data/bug-6948.php');
$this->assertNoErrors($errors);
}

public function testBug7963(): void
{
$errors = $this->runAnalyse(__DIR__ . '/data/bug-7963.php');
Expand Down
64 changes: 64 additions & 0 deletions tests/PHPStan/Analyser/data/bug-6948.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?php declare(strict_types = 1);

namespace Bug6948;

$row = [1];
if (rand()) {
$row[] = $row;
}
if (rand()) {
$row[] = $row;
}
if (rand()) {
$row[] = $row;
}

if (rand()) {
$row[] = $row;
}
if (rand()) {
$row[] = $row;
}
if (rand()) {
$row[] = $row;
}

if (rand()) {
$row[] = $row;
}
if (rand()) {
$row[] = $row;
}
if (rand()) {
$row[] = $row;
}

if (rand()) {
$row[] = $row;
}
if (rand()) {
$row[] = $row;
}
if (rand()) {
$row[] = $row;
}

if (rand()) {
$row[] = $row;
}
if (rand()) {
$row[] = $row;
}
if (rand()) {
$row[] = $row;
}

if (rand()) {
$row[] = $row;
}
if (rand()) {
$row[] = $row;
}
if (rand()) {
$row[] = $row;
}

0 comments on commit f9c7bbd

Please sign in to comment.