Problem/Motivation
In #3224523: [PHP 8.1] Add ReturnTypeWillChange attribute where necessary we introduced #[\ReturnTypeWillChange].
The sniff "Drupal.Commenting.InlineComment.WrongStyle throws an error on each of them:
FILE: \drupal\core\lib\Drupal\Component\FileSystem\RegexDirectoryIterator.php
-----------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------------
36 | ERROR | [x] Perl-style comments are not allowed; use "// Comment" instead
| | (Drupal.Commenting.InlineComment.WrongStyle)
37 | ERROR | [x] You must use "/**" style comments for a function comment
| | (Drupal.Commenting.FunctionComment.WrongStyle)
-----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------
[snipped]
drupal\core\lib\Drupal\Component\FileSystem\RegexDirectoryIterator.php lines 33-37:
/**
* Implements \FilterIterator::accept().
*/
#[\ReturnTypeWillChange]
public function accept() {
Steps to reproduce
Run phpcs -s from the core directory
Proposed resolution
Allow [\ReturnTypeWillChange] in sniff "Drupal.Commenting.InlineComment.WrongStyle
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comments
Comment #2
spokjeComment #3
spokjeComment #4
spokjeComment #5
claudiu.cristeaStarted here https://github.com/pfrenssen/coder/pull/157
Comment #7
claudiu.cristeaNeeds review & test enabling on GitHub https://github.com/pfrenssen/coder/pull/157
Comment #8
klausiMerged, thanks!