Skip to content

Commit 7eb462b

Browse files
committed
Fix false/true bool annotation.
1 parent 3dcb12c commit 7eb462b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

PSR2R/Sniffs/Commenting/DocBlockVarSniff.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ public function process(File $phpCsFile, $stackPointer) {
9595
if (in_array($defaultValueType, $parts, true)) {
9696
return;
9797
}
98+
if ($defaultValueType === 'bool' && (in_array('true', $parts, true) || in_array('false', $parts, true))) {
99+
return;
100+
}
101+
98102
if ($defaultValueType === 'array' && strpos($content, '[]') !== false) {
99103
return;
100104
}

0 commit comments

Comments
 (0)