function RequireConstructorPropertyPromotionSniff::areTypeHintEqual
1 call to RequireConstructorPropertyPromotionSniff::areTypeHintEqual()
- RequireConstructorPropertyPromotionSniff::process in vendor/
slevomat/ coding-standard/ SlevomatCodingStandard/ Sniffs/ Classes/ RequireConstructorPropertyPromotionSniff.php - * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint *
File
-
vendor/
slevomat/ coding-standard/ SlevomatCodingStandard/ Sniffs/ Classes/ RequireConstructorPropertyPromotionSniff.php, line 349
Class
Namespace
SlevomatCodingStandard\Sniffs\ClassesCode
private function areTypeHintEqual(?TypeHint $parameterTypeHint, ?TypeHint $propertyTypeHint) : bool {
if ($parameterTypeHint === null && $propertyTypeHint === null) {
return true;
}
if ($parameterTypeHint === null || $propertyTypeHint === null) {
return false;
}
return $parameterTypeHint->getTypeHint() === $propertyTypeHint->getTypeHint();
}