Gert-dev / php-ide-serenata

Atom IDE package that integrates the Serenata server to provide PHP code assistance
https://serenata.gitlab.io/
Other
274 stars 19 forks source link

Introduce property should try to guess the type of the new property #399

Open Gert-dev opened 6 years ago

Gert-dev commented 6 years ago

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