我在自定义扩展程序上运行具有EcgM2标准的codeniffer,并且收到警告
方法参数
$context从不使用
用于InstallSchema.php文件。
如何使该警告消失?
我的方法如下所示(注意SuppressWarnings顶部):
/**
 * {@inheritdoc}
 * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
 */
public function install(SchemaSetupInterface $setup, ModuleContextInterface $context)
{
    //my install script here that does not use the parameter $context
}
// @codingStandardsIgnoreEnd在方法签名和大括号之间添加会引起phpcs警告-phpcs:大括号应在声明后的行上;找到1个空白行