I'm hinting the class to a $variable, because I'm setting the class on runtime. After that, the $variable changes it's type, hinted by a method, but the new type is not reflected, and the old type is still used, which is wrong

1) setting the $field as AbstractField

2) confirming $field is an AbstractField

3) overwriting $field with $field->html() which returns a string, so $field should be a string now

4) but vscode still thinks $field is an AbstratField, not a string

17 days later
Write a Reply...