在使用PhpStorm的时候,经常会有在不同项目使用同个类名的情况。
PhpStorm在默认配置下,对相同的类名会发出如下警告:Other declaration of class xxx exist at xxx.php。
有时候看着挺讨厌的,我们可以通过修改PhpStorm配置的办法来解决这个问题。
以下是该问题的解决方案:
找到:PhpStorm -> Preferences -> Editor -> Inspections -> PHP -> Undefined -> Undefined class
勾选:Don’t report multiple class declaration potential problems
本文结束!谢谢大家!