Describe the bug
--------------------------------------------------------------------------------
1 | ERROR | An error occurred during processing; checking has been aborted.
| | The error message was: Undefined array key "parenthesis_closer" in
| | /vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.php
| | on line 75
| | The error originated in the
| | Generic.Functions.OpeningFunctionBraceBsdAllman sniff on line 75.
--------------------------------------------------------------------------------
Code sample
Line 101 in acp_controller.php (see attachment)
public function display_options(string): array
codesniffer#1423.zip
Variant 2
public function add_page_header_link
To reproduce
Steps to reproduce the behavior:
- Create a file called
test.php with the code sample above...
- Run
phpcs test.php ...
- See error message displayed
Expected behavior
No program error. ^^
Versions (please complete the following information)
|
|
| Operating System |
Windows 10/Linux |
| PHP version |
8.5 |
| PHP_CodeSniffer version |
4.0.1 (0525c73) |
| Standard |
Generic |
| Install type |
Composer |
Additional context
Hi Juliette
While sporadically reviewing the reports from my test suite "phpBB Ext Check," I noticed this error in one of the reports. Since all files are deleted from the server after the check, I can't post the code causing the error here. However, if the information provided here isn't sufficient to locate the problem, I would contact the developer to request the ZIP file that contains the error.
Please confirm
Describe the bug
Code sample
Line 101 in
acp_controller.php(see attachment)codesniffer#1423.zip
Variant 2
To reproduce
Steps to reproduce the behavior:
test.phpwith the code sample above...phpcs test.php ...Expected behavior
No program error. ^^
Versions (please complete the following information)
Additional context
Hi Juliette
While sporadically reviewing the reports from my test suite "phpBB Ext Check," I noticed this error in one of the reports. Since all files are deleted from the server after the check, I can't post the code causing the error here. However, if the information provided here isn't sufficient to locate the problem, I would contact the developer to request the ZIP file that contains the error.
Please confirm
4.xbranch of PHP_CodeSniffer.