Skip to content

Commit

Permalink
Fix Psalm errors
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Sep 1, 2020
1 parent 7fd1e1f commit 01140f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -268,13 +268,14 @@ public static function analyze(
$stmt->args,
$stmt->getAttributes()
);
$ret_value = FunctionCallAnalyzer::analyze(

FunctionCallAnalyzer::analyze(
$statements_analyzer,
$fake_function_call,
$context
);

$function_return = $statements_analyzer->node_data->getType($fake_function_call);
$function_return = $statements_analyzer->node_data->getType($fake_function_call) ?: Type::getMixed();
$statements_analyzer->node_data = $old_node_data;

if (!$result->return_type) {
Expand Down
2 changes: 0 additions & 2 deletions src/Psalm/Internal/Type/NegatedAssertionReconciler.php
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,6 @@ private static function handleLiteralNegatedEquality(

if ($scalar_type === 'int') {
if ($existing_var_type->hasInt()) {
$scalar_value = substr($assertion, $bracket_pos + 1, -1);

if ($existing_int_types = $existing_var_type->getLiteralInts()) {
if (!$existing_var_type->hasPositiveInt()) {
$did_match_literal_type = true;
Expand Down

0 comments on commit 01140f1

Please sign in to comment.