我是laravel app并决定添加phpmd
。
User
模型中的示例代码
use Illuminate\Support\Facades\Hash;
...
public function setPasswordAttribute($value)
{
$this->attributes['password'] = Hash::make($value);
}
phpmd
显示错误
Avoid using static access to class '\Illuminate\Support\Facades\Hash' in method 'setPasswordAttribute'.
如何处理此类错误?