To do this, the cursor can be moved to the end of the statement, followed by a call to DeduceTypes with the name of the property.
This possibly needs improvements to the base package first, as the type of properties is currently always deduced from the property itself (which doesn't yet exist in this case) and is not subject to local conditional type checks or assignments in the same way local variables are. See also [1].
To do this, the cursor can be moved to the end of the statement, followed by a call to
DeduceTypes
with the name of the property.This possibly needs improvements to the base package first, as the type of properties is currently always deduced from the property itself (which doesn't yet exist in this case) and is not subject to local conditional type checks or assignments in the same way local variables are. See also [1].
[1] https://github.com/Gert-dev/php-integrator-base/issues/193