Skip to content

Commit

Permalink
fix CS
Browse files Browse the repository at this point in the history
  • Loading branch information
orklah committed Jan 19, 2022
1 parent 6c5155f commit 923454f
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -42,7 +42,7 @@ public static function getFunctionReturnType(FunctionReturnTypeProviderEvent $ev

$first_arg_type = $nodeTypeProvider->getType($call_args[0]->value);
if ($first_arg_type === null) {
if ($codebase->analysis_php_version_id >= 80000) {
if ($codebase->analysis_php_version_id >= 8_00_00) {
return new Union([new TString(), new TTrue()]);
} else {
return new Union([new TString(), new TBool()]);
Expand Down Expand Up @@ -85,23 +85,23 @@ public static function getFunctionReturnType(FunctionReturnTypeProviderEvent $ev

$list_return_atomics = [];
if ($has_string || $has_stringable || $has_tostring) {
if ($codebase->analysis_php_version_id >= 80000) {
if ($codebase->analysis_php_version_id >= 8_00_00) {
$list_return_atomics[] = Type::getTrue();
} else {
$list_return_atomics[] = Type::getBool();
}
}

if ($has_null) {
if ($codebase->analysis_php_version_id >= 80000) {
if ($codebase->analysis_php_version_id >= 8_00_00) {
$list_return_atomics[] = Type::getString();
} else {
$list_return_atomics[] = Type::getFalse();
}
}

if ($has_unknown) {
if ($codebase->analysis_php_version_id >= 80000) {
if ($codebase->analysis_php_version_id >= 8_00_00) {
$list_return_atomics[] = Type::getNever();
} else {
$list_return_atomics[] = Type::getNull();
Expand Down

0 comments on commit 923454f

Please sign in to comment.