Named arguments in structure replacement

I have some custom structure replacement inspections, to not forget that I need to use `mb_*` functions and for them to have explicit encoding in certain scope. These inspections work fine, unless I use named arguments. For example, I have inspection

mb_trim($p$)

which replaces code with

mb_trim($p$, encoding: 'UTF-8')

but I also have

mb_trim($p$[2,2])

that replaces code with

mb_trim($p$[2,2], 'UTF-8')

2nd inspection is triggered by code

mb_trim('text', encoding: ‘UTF-8’)

And I do not want it to, because the encoding is already present. Is there a way to “exclude” cases where “encoding” is provided as named argument?

0

请先登录再写评论。