<?php
class A {
/** @var array<string> */
public array $methods;
}
$a = null;
if ($r) {
if ($r instanceof A) {
$a = $r;
}
}
$b = $a->methods; // $b can't resolve type to string[], even through $a is A|null
Maybe just the tooltip is incorrect?
@trace is correct but tooltip and autocomplete not working:
@trace
is correct but tooltip and autocomplete not working:Originally posted by @ging-dev in https://github.com/DEVSENSE/phptools-docs/issues/694#issuecomment-2415605765