-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Describe the bug
A clear and concise description of what the bug is.
Code sample
<?php
namespace Foo;
class Foo
{
public function empty(): bool
{
return true;
}
}
Custom ruleset
Using PSR12 ruleset
To reproduce
Steps to reproduce the behavior:
- Create a file called
Foo.php
with the code sample above... - Run
phpcs --standard=psr12 Foo.php
- See error message displayed
$ ./vendor/bin/phpcs --standard=psr12 -s Foo.php
FILE: /projects/PHPCS_Issue/Foo.php
-----------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
7 | ERROR | Expected "function abc(...)"; found "function abc(...)"
| | (Squiz.Functions.FunctionDeclaration.Found)
-----------------------------------------------------------------------------------------------------------------
Time: 49ms; Memory: 14MB
Expected behavior
No error should occur. It wasn't with previous version
Versions (please complete the following information):
- OS: Linux
- PHP: 7.4
- PHPCS: 3.7.0
- Standard: PSR12
Additional context
Detected by my CI when upgrading PHPCodesniffer to latest release
Metadata
Metadata
Assignees
Labels
No labels