Context
Part of #60.
Data
mago analyze flags incompatible-property-type, invalid-property-assignment-value, and 2x redundant-condition around $resource (declared /** @var mysqli */ protected $resource;, non-nullable per docblock, but disconnect() genuinely sets it to null). Making the property honestly nullable (native ?mysqli or docblock-only mysqli|null) was tried and reverted: it cascades into ~6 new possible-method-access-on-null findings across every other method (beginTransaction(), commit(), rollback(), getLastGeneratedValue(), etc.), because mago does not retain null-narrowing of a class property across separate statements/methods, matching the same limitation already documented for Statement.php in #61.
These findings will be captured in a mago baseline rather than fixed or suppressed inline.
Context
Part of #60.
Data
mago analyzeflagsincompatible-property-type,invalid-property-assignment-value, and 2xredundant-conditionaround$resource(declared/** @var mysqli */ protected $resource;, non-nullable per docblock, butdisconnect()genuinely sets it tonull). Making the property honestly nullable (native?mysqlior docblock-onlymysqli|null) was tried and reverted: it cascades into ~6 newpossible-method-access-on-nullfindings across every other method (beginTransaction(),commit(),rollback(),getLastGeneratedValue(), etc.), because mago does not retain null-narrowing of a class property across separate statements/methods, matching the same limitation already documented forStatement.phpin #61.These findings will be captured in a mago baseline rather than fixed or suppressed inline.