Skip to content

Commit 07e12c7

Browse files
committed
Fix inline sniff.
1 parent 0349ca3 commit 07e12c7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

PhpCollective/Sniffs/Commenting/InlineDocBlockSniff.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ protected function findErrors(File $phpCsFile, int $contentIndex, bool $isSingle
194194
$comment = $tokens[$contentIndex]['content'];
195195

196196
// SKip for complex arrays until next major
197-
if (str_contains($comment, '<')) {
197+
if (str_contains($comment, '<') || str_starts_with($comment, 'array{')) {
198198
return [];
199199
}
200200

@@ -215,6 +215,9 @@ protected function findErrors(File $phpCsFile, int $contentIndex, bool $isSingle
215215
$errors['space-before-end'] = 'Expected single space before ´*/´';
216216
}
217217

218+
var_export($contentMatches);
219+
die();
220+
218221
if (!preg_match('|^\$[a-z0-9_]+$|i', $contentMatches[3])) {
219222
$errors['order'] = 'Expected `{Type} ${var}`, got `' . $contentMatches[1] . $contentMatches[2] . $contentMatches[3] . '`';
220223
}

0 commit comments

Comments
 (0)