Skip to content

Undefined array key "parenthesis_closer" #3973

Description

@LukeWCS

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

echo "A short code snippet that can be used to reproduce the bug. Do NOT paste screenshots of code!";

To reproduce

Steps to reproduce the behavior:

  1. Create a file called test.php with the code sample above...
  2. Run phpcs test.php ...
  3. See error message displayed
PHPCS output here

Expected behavior

No program error. ^^

Versions (please complete the following information)

Operating System Windows 10
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 message.

Please confirm:

  • I have searched the issue list and am not opening a duplicate issue.
  • I confirm that this bug is a bug in PHP_CodeSniffer and not in one of the external standards.
  • I have verified the issue still exists in the master branch of PHP_CodeSniffer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions