Skip to content

Commit a99a2d9

Browse files
committed
Check for empty string instead of using php's empty.
1 parent 68eb458 commit a99a2d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

custom-standards/Flyeralarm/Sniffs/Docblock/ReturnTypeSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ private function checkReturnTypeShape(string $subject)
154154
}
155155

156156
foreach ($matches['nested'] as $index => $match) {
157-
if (!empty($matches['generic'][$index])) {
157+
if ($matches['generic'][$index] === '') {
158158
if (trim($matches['atom'][$index]) !== 'array') {
159159
throw new \InvalidArgumentException('Unexpected generic specification in type "' . $matches[0][$index] . '"');
160160
}

0 commit comments

Comments
 (0)