Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Loading