phpstan-src
phpstan-src copied to clipboard
Don't report already assigned errors when setting or unsetting an offset on array access objects set as class properties.
fixes https://github.com/phpstan/phpstan/issues/13856
Took inspiration from https://github.com/phpstan/phpstan-src/pull/3817 when implementing the fix.
Not entirely 100% sure about the proposed changes here, as passing through the $originalNode to the PropertyWrite constructor feels a little heavy handed, considering i only need one of the 3 types that it could be, and also it has to be null because of the parent constructor case, so open to suggestions there.
i have no intuition on how to deal with the escaped mutants mentioned by CI :angel:, if someone could give me a pointer that'd be appreciated