当我运行 phpmd 时,出现此错误(来自 cleancode 规则集):避免使用静态访问类 '\Namespace\Domain\Exception\UserExceptions'
我用这个内容制作了一个 phpmd.xml:
<?xml version="1.0"?>
<ruleset>
<rule ref="rulesets/cleancode.xml">
<properties>
<property name="exceptions" value="'\Namespace\Domain\Exception\UserExceptions'"/>
</properties>
</rule>
</ruleset>
但这对我不起作用,我指定类名的语法是否错误?我也尝试:
value="\Namespace\Domain\Exception\UserExceptions"
value="UserExceptions"
value="'UserExceptions'"
但没有一个选项对我有用。