Skip to content

Commit

Permalink
Fix false/true bool annotation.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Jul 30, 2019
1 parent 3dcb12c commit 7eb462b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions PSR2R/Sniffs/Commenting/DocBlockVarSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ public function process(File $phpCsFile, $stackPointer) {
if (in_array($defaultValueType, $parts, true)) {
return;
}
if ($defaultValueType === 'bool' && (in_array('true', $parts, true) || in_array('false', $parts, true))) {
return;
}

if ($defaultValueType === 'array' && strpos($content, '[]') !== false) {
return;
}
Expand Down

0 comments on commit 7eb462b

Please sign in to comment.