Closed
Description
Describe the bug
Squiz.Commenting.FunctionComment
sniff throws ThrowsNoFullStop
on one line php doc comment with @throws annotation.
Code sample
<?php
declare(strict_types=1);
namespace My;
use Exception;
/** @throws Exception if any other error occurs. */
function foo(string $string): string
{
return $string;
}
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
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
9 | ERROR | @throws tag comment must end with a full stop
| | (Squiz.Commenting.FunctionComment.ThrowsNoFullStop)
Expected behavior
No error :-)
Versions (please complete the following information):
- OS: Ubuntu 18.04
- PHP: 8.0
- PHPCS: 3.6.1
- Standard: Squiz