alleyinteractive / alleyinteractive/create-wordpress-plugin

Skip `RemoveUselessVarTagRector` Rector rule to satisfy PHPCS

未关闭
#514 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
PHP
星标
35
派生
2
平均合并
1 天 11 小时
30 天内合并 PR
3

描述

### Description of the bug

PHPCS and Rector are in disagreement about variable comments in classes.

In Rector, the rule is `RemoveUselessVarTagRector`

In PHPCS, the rule is `Squiz.Commenting.VariableComment.MissingVar`

We should skip `Rector\DeadCode\Rector\Property\RemoveUselessVarTagRector::class` in `rector` to satisfy PHPCS and ensure maximum tooling compatibility.

### Steps To Reproduce

1. Create a new plugin with `create-wordpress-plugin`
2. Create a class with a variable, e.g.
```
/**
* REST_API instance.
*
* @var REST_API
*/
private REST_API $api;
```
3. Notice that the presence of `@var REST_API` breaks Rector, and removing `@var REST_API` breaks PHPCS

### Additional Information

_No response_

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。