Skip to content

Commit 8acfada

Browse files
committed
Fix bug
1 parent cae56af commit 8acfada

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ protected function processParams(File $phpcsFile, $stackPtr, $commentStart)
406406

407407
foreach ($typeNames as $typeName) {
408408
// Strip nullable operator.
409-
if ($typeName[0] === '?') {
409+
if (strlen($typeName) > 1 && $typeName[0] === '?') {
410410
$typeName = substr($typeName, 1);
411411
}
412412

0 commit comments

Comments
 (0)