alleyinteractive / alleyinteractive/create-wordpress-plugin

Skip `RemoveUselessVarTagRector` Rector rule to satisfy PHPCS

Đang mở
#514 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
PHP
Star
35
Fork
2
Merge trung bình
1 ngày 11 giờ
Pull request đã merge (30 ngày)
3

Mô tả

### 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_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.