You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Variable is not marked as undefined in method if phpdoc describe the variable in other method.
Describe the eclipse environment
Version: 2024-12
PDT : 8.2
To Reproduce
Steps to reproduce the behavior:
<?php
class Test
{
public function test1()
{
/**
* @var \DateTime $date
*/
$date = new \DateTime();
}
public function test2()
{
$test = $date->test();
echo $test;
}
}
Expected behavior
$date in test2 should marked as undefined.
If I remove "@var \DateTime $date" comment, $date in test2 is correctly marked as undefined.
Screenshots
The text was updated successfully, but these errors were encountered:
Describe the bug
Variable is not marked as undefined in method if phpdoc describe the variable in other method.
Describe the eclipse environment
Version: 2024-12
PDT : 8.2
To Reproduce
Steps to reproduce the behavior:
Expected behavior
$date in test2 should marked as undefined.
If I remove "@var \DateTime $date" comment, $date in test2 is correctly marked as undefined.
Screenshots
The text was updated successfully, but these errors were encountered: