Skip to content

Commit e10e363

Browse files
committed
use isVoid()
1 parent a14317b commit e10e363

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Rule/ForbidPhpDocNullabilityMismatchWithNativeTypehintRule.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
use PHPStan\Type\MixedType;
1919
use PHPStan\Type\NullType;
2020
use PHPStan\Type\Type;
21-
use PHPStan\Type\VoidType;
2221
use function array_merge;
2322
use function is_string;
2423

@@ -245,7 +244,7 @@ private function comparePhpDocAndNativeType(
245244
return [];
246245
}
247246

248-
if ($nativeReturnType instanceof MixedType || $nativeReturnType instanceof VoidType) {
247+
if ($nativeReturnType instanceof MixedType || $nativeReturnType->isVoid()->yes()) {
249248
return [];
250249
}
251250

0 commit comments

Comments
 (0)