Hello!
It wan't easy to "decode" your feedback, but I understood your problem as following:
Due to some pattern of some PHP framework you have issue on rule "String literals should not be duplicated".
So,
1) I don't see the reason not to move string repeated 4 times into constant (IMHO even 1 time is enough in this use case).
2) This rule "String literals should not be duplicated" has parameter equal 3 by default, you can increase it. Finally you can always disable rule.
If you think that first option is a bad one, please explain why.
Next time, please specify rule and code which reproduces the issue more properly.
Thanks!