diff --git a/phpcs-sniffs/Formidable/Sniffs/Commenting/AddMissingDocblockSniff.php b/phpcs-sniffs/Formidable/Sniffs/Commenting/AddMissingDocblockSniff.php index d745997289..bb3e65816c 100644 --- a/phpcs-sniffs/Formidable/Sniffs/Commenting/AddMissingDocblockSniff.php +++ b/phpcs-sniffs/Formidable/Sniffs/Commenting/AddMissingDocblockSniff.php @@ -374,8 +374,8 @@ private function detectCertainReturnType( File $phpcsFile, $stackPtr ) { if ( count( $uniqueTypes ) === 1 ) { $type = $uniqueTypes[0]; - // Skip int if there's an uncertain return type (e.g., return $variable). - if ( 'int' === $type && $hasUncertainType ) { + // Skip int/bool if there's an uncertain return type (e.g., return $variable). + if ( in_array( $type, array( 'int', 'bool' ), true ) && $hasUncertainType ) { return null; }