mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
Fix redundancies
This commit is contained in:
parent
326c47ef75
commit
910d617608
@ -684,8 +684,7 @@ abstract class FunctionLikeAnalyzer extends SourceAnalyzer
|
|||||||
)
|
)
|
||||||
: Type::getVoid();
|
: Type::getVoid();
|
||||||
|
|
||||||
if ($inferred_return_type
|
if (!$inferred_return_type->isVoid()
|
||||||
&& !$inferred_return_type->isVoid()
|
|
||||||
&& !$inferred_return_type->isFalse()
|
&& !$inferred_return_type->isFalse()
|
||||||
&& !$inferred_return_type->isNull()
|
&& !$inferred_return_type->isNull()
|
||||||
&& !$inferred_return_type->isSingleIntLiteral()
|
&& !$inferred_return_type->isSingleIntLiteral()
|
||||||
@ -785,7 +784,6 @@ abstract class FunctionLikeAnalyzer extends SourceAnalyzer
|
|||||||
)
|
)
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
if ($closure_return_type || $closure_yield_type) {
|
|
||||||
if ($closure_yield_type) {
|
if ($closure_yield_type) {
|
||||||
$closure_return_type = $closure_yield_type;
|
$closure_return_type = $closure_yield_type;
|
||||||
}
|
}
|
||||||
@ -811,7 +809,6 @@ abstract class FunctionLikeAnalyzer extends SourceAnalyzer
|
|||||||
$closure_atomic->is_pure = !$this->inferred_impure;
|
$closure_atomic->is_pure = !$this->inferred_impure;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ($codebase->collect_references
|
if ($codebase->collect_references
|
||||||
&& !$context->collect_initializations
|
&& !$context->collect_initializations
|
||||||
|
Loading…
Reference in New Issue
Block a user