Skip to content

Commit 4f11c35

Browse files
committed
Fix bug-13539 test for PHP 7.4 compatibility (use PHPDoc instead of native mixed)
1 parent 034a1a3 commit 4f11c35

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

tests/PHPStan/Rules/Properties/AccessPropertiesRuleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,7 @@ public function testBug13539(): void
12801280
$this->analyse([__DIR__ . '/data/bug-13539.php'], [
12811281
[
12821282
'Access to an undefined property object::$baz.',
1283-
26,
1283+
29,
12841284
'Learn more: <fg=cyan>https://phpstan.org/blog/solving-phpstan-access-to-undefined-property</>',
12851285
],
12861286
]);

tests/PHPStan/Rules/Properties/data/bug-13539.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ function works_too(string $x): void {
1919
}
2020
}
2121

22-
function also_ok(mixed $tmp): void {
22+
/**
23+
* @param mixed $tmp
24+
*/
25+
function also_ok($tmp): void {
2326
if (isset($tmp->foo) && isset($tmp->bar)) {
2427
echo $tmp->foo;
2528
echo $tmp->bar;

0 commit comments

Comments
 (0)