Skip to content

Commit f5ac7f0

Browse files
authored
Fix remaining errors after LegacyNodeScopeResolverTest refactoring (#5202)
1 parent 4c92db6 commit f5ac7f0

5 files changed

Lines changed: 29 additions & 2 deletions

File tree

tests/PHPStan/Analyser/AnalyserIntegrationTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,6 +1475,7 @@ public function testBug13945Two(): void
14751475
$this->assertNoErrors($errors);
14761476
}
14771477

1478+
#[RequiresPhp('>= 8.1')]
14781479
public function testBug12246(): void
14791480
{
14801481
$errors = $this->runAnalyse(__DIR__ . '/data/bug-12246.php');
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php // lint < 8.1
2+
3+
namespace PropertiesNamespacePhp81;
4+
5+
use PropertiesNamespace\Bar;
6+
use function PHPStan\Testing\assertType;
7+
8+
use SomeNamespace\Amet as Dolor;
9+
use SomeGroupNamespace\{One, Two as Too, Three};
10+
11+
/**
12+
* @property-read string $documentElement
13+
*/
14+
abstract class Foo extends Bar
15+
{
16+
public function doFoo()
17+
{
18+
assertType('string', $this->documentElement);
19+
}
20+
21+
}

tests/PHPStan/Analyser/nsrt/properties.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php // lint >= 8.1
22

33
namespace PropertiesNamespace;
44

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php // lint < 8.3
2+
3+
use function PHPStan\Testing\assertType;
4+
5+
assertType('array{2.0, 3.0, 4.0, 5.0}', range(2, 5, 1.0));

tests/PHPStan/Analyser/nsrt/range-function.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php // lint >= 8.3
22

33
use function PHPStan\Testing\assertType;
44

0 commit comments

Comments
 (0)