我不明白为什么PHPStorm给了我以下警告
PHPDoc注释与这种方法不匹配函数或方法签名:
原文链接:https://www.f2er.com/php/131477.html/** * Create a new instance of the class * @param string $classname Class to instantiate * @return object the instance * @throw FactoryException If the class is not instantiable */ private function newInstance($classname) { $reflectionClass = new \ReflectionClass($classname); if (! $reflectionClass->isInstantiable()) { throw new FactoryException("The class $classname is not instantiable."); } return new $classname; }@H_301_3@警告并不是非常具体,我已经尝试过几种改变返回类型为“Object”,“mixed”甚至“int”(尝试)的东西,但没有改变.这里有什么问题?