Closed AnnaDamm closed 3 years ago
Update: Okay I suppose it is fixed within the newer reflection-parser version in dev-master. But with that version I cannot use nullable return types :-(
Hello! Initial fail was indeed related to changes inside PhpParser and reflection-parser libraries. This was fixed already, so I can guess that this issue can be closed.
Sorry for late reply, because I wasn't able to dedicate my time for OSS project previously, thus very limited support, but if you want - you can contribute by sending a PR for missing functionality.
Given the input code:
The SelfValueTransformer outputs this code:
It replaces seemingly random places in the code. In the above example it is pretty much random that the name is actually next to the "self". If i had other code above (like an if statement), it would replace something else.
I have found that the the startTokenPos on nodes withing
$replacedNodes
does not actually contain the position within $metadata->tokenStream. So the token that is replaced is random indeed.