Problem/Motivation
When using asymmetric visibility for a class property declaration in PHP 8.4, I discovered that PHPCS always reports the following error:
Missing member variable doc comment (Drupal.Commenting.VariableComment.Missing)
Steps to reproduce
Create the following file, then run phpcs -s --standard=Drupal,DrupalPractice on it:
<?php
/**
* @file
* This is a test comment.
*/
return new class() {
/**
* This is a test comment.
*
* @var array
*/
public private(set) array $data = [];
};
You should see the superfluous error message from above, even though there is a doc comment.
Proposed resolution
TBD.
Remaining tasks
TBD.
User interface changes
n/a?
API changes
n/a?
Data model changes
n/a?
Issue fork coder-3554243
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #5
klausiMerged a fix into 9.x, thanks for reporting!