RemovedCallingDestructAfterConstructorExit: improve warning message by jrfnl · Pull Request #1283 · PHPCompatibility/PHPCompatibility

@jrfnl

This sniff can throw an error or a warning depending on whether a `destruct()` method has been found in the class (error) or not, but the class has a parent class or uses traits (warning).

This improves the message shown for the `warning` case to make it clearer how to take action on the issue.

It also ensure that the error and the warning each have a unique error code.

wimg

wimg approved these changes Apr 17, 2021

@wimg wimg deleted the php-8.0/removeddestructafterconstructorexit-improve-error-msg branch

April 17, 2021 15:28