mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Fix indentation
This commit is contained in:
parent
30754bcd52
commit
8a8253ac4c
@ -56,7 +56,7 @@ class ScopeChecker
|
||||
public static function getFinalControlActions(array $stmts)
|
||||
{
|
||||
if (empty($stmts)) {
|
||||
return [SELF::ACTION_NONE];
|
||||
return [self::ACTION_NONE];
|
||||
}
|
||||
|
||||
$control_actions = [];
|
||||
|
@ -721,10 +721,10 @@ class IfChecker
|
||||
$old_elseif_context = clone $elseif_context;
|
||||
|
||||
if ($statements_checker->analyze(
|
||||
$elseif->stmts,
|
||||
$elseif_context,
|
||||
$loop_scope
|
||||
) === false
|
||||
$elseif->stmts,
|
||||
$elseif_context,
|
||||
$loop_scope
|
||||
) === false
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
@ -969,10 +969,10 @@ class IfChecker
|
||||
$old_else_context = clone $else_context;
|
||||
|
||||
if ($statements_checker->analyze(
|
||||
$else->stmts,
|
||||
$else_context,
|
||||
$loop_scope
|
||||
) === false
|
||||
$else->stmts,
|
||||
$else_context,
|
||||
$loop_scope
|
||||
) === false
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
@ -2620,31 +2620,31 @@ class CallChecker
|
||||
|
||||
if (!in_array(strtolower($callable_fq_class_name), ['self', 'static', 'parent'], true)) {
|
||||
if (ClassLikeChecker::checkFullyQualifiedClassLikeName(
|
||||
$statements_checker,
|
||||
$callable_fq_class_name,
|
||||
$code_location,
|
||||
$statements_checker->getSuppressedIssues()
|
||||
) === false
|
||||
$statements_checker,
|
||||
$callable_fq_class_name,
|
||||
$code_location,
|
||||
$statements_checker->getSuppressedIssues()
|
||||
) === false
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (MethodChecker::checkMethodExists(
|
||||
$project_checker,
|
||||
$function_id,
|
||||
$code_location,
|
||||
$statements_checker->getSuppressedIssues()
|
||||
) === false
|
||||
$project_checker,
|
||||
$function_id,
|
||||
$code_location,
|
||||
$statements_checker->getSuppressedIssues()
|
||||
) === false
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (self::checkFunctionExists(
|
||||
$statements_checker,
|
||||
$function_id,
|
||||
$code_location
|
||||
) === false
|
||||
$statements_checker,
|
||||
$function_id,
|
||||
$code_location
|
||||
) === false
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
@ -630,11 +630,11 @@ class ExpressionChecker
|
||||
return null;
|
||||
}
|
||||
IssueBuffer::add(
|
||||
new UndefinedVariable(
|
||||
'Cannot find referenced variable ' . $var_name,
|
||||
new CodeLocation($statements_checker->getSource(), $stmt)
|
||||
)
|
||||
);
|
||||
new UndefinedVariable(
|
||||
'Cannot find referenced variable ' . $var_name,
|
||||
new CodeLocation($statements_checker->getSource(), $stmt)
|
||||
)
|
||||
);
|
||||
|
||||
$stmt->inferredType = Type::getMixed();
|
||||
|
||||
|
@ -1056,15 +1056,16 @@ class StatementsChecker extends SourceChecker implements StatementsSource
|
||||
|
||||
if (!$this->local_return_type->isGenerator()
|
||||
&& !TypeChecker::isContainedBy(
|
||||
$this->source->getFileChecker()->project_checker,
|
||||
$inferred_type,
|
||||
$this->local_return_type,
|
||||
$stmt->inferredType->ignore_nullable_issues,
|
||||
false,
|
||||
$has_scalar_match,
|
||||
$type_coerced,
|
||||
$type_coerced_from_mixed
|
||||
)) {
|
||||
$this->source->getFileChecker()->project_checker,
|
||||
$inferred_type,
|
||||
$this->local_return_type,
|
||||
$stmt->inferredType->ignore_nullable_issues,
|
||||
false,
|
||||
$has_scalar_match,
|
||||
$type_coerced,
|
||||
$type_coerced_from_mixed
|
||||
)
|
||||
) {
|
||||
// is the declared return type more specific than the inferred one?
|
||||
if ($type_coerced) {
|
||||
if (IssueBuffer::accepts(
|
||||
|
Loading…
x
Reference in New Issue
Block a user