1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

fix typos

This commit is contained in:
orklah 2021-07-29 20:59:52 +02:00
parent ffbdaa80b1
commit d0fe1528b6
11 changed files with 13 additions and 13 deletions

View File

@ -269,7 +269,7 @@ class IfConditionalAnalyzer
}
}
// get all the var ids that were referened in the conditional, but not assigned in it
// get all the var ids that were referenced in the conditional, but not assigned in it
$cond_referenced_var_ids = array_diff_key($cond_referenced_var_ids, $assigned_in_conditional_var_ids);
$cond_referenced_var_ids = array_merge($newish_var_ids, $cond_referenced_var_ids);

View File

@ -343,7 +343,7 @@ class IfAnalyzer
Context $post_if_context,
array $assigned_in_conditional_var_ids
) : void {
// this filters out coercions to expeccted types in ArgumentAnalyzer
// this filters out coercions to expected types in ArgumentAnalyzer
$assigned_in_conditional_var_ids = \array_filter($assigned_in_conditional_var_ids);
if (!$assigned_in_conditional_var_ids) {

View File

@ -195,7 +195,7 @@ class IfElseAnalyzer
}
}
// define this before we alter local claues after reconciliation
// define this before we alter local clauses after reconciliation
$if_scope->reasonable_clauses = $if_context->clauses;
try {

View File

@ -1394,7 +1394,7 @@ class AssignmentAnalyzer
}
if ($already_in_scope) {
// removes dependennt vars from $context
// removes dependent vars from $context
$context->removeDescendents(
$list_var_id,
$context->vars_in_scope[$list_var_id],

View File

@ -102,7 +102,7 @@ class ArgumentsAnalyzer
foreach ($args as $argument_offset => $arg) {
if ($function_params === null) {
if (self::evaluateAribitraryParam(
if (self::evaluateArbitraryParam(
$statements_analyzer,
$arg,
$context
@ -1058,7 +1058,7 @@ class ArgumentsAnalyzer
/**
* @return false|null
*/
private static function evaluateAribitraryParam(
private static function evaluateArbitraryParam(
StatementsAnalyzer $statements_analyzer,
PhpParser\Node\Arg $arg,
Context $context

View File

@ -428,7 +428,7 @@ class ReturnAnalyzer
),
$statements_analyzer->getSuppressedIssues()
)) {
// fall throuhg
// fall through
}
}
@ -523,7 +523,7 @@ class ReturnAnalyzer
),
$statements_analyzer->getSuppressedIssues()
)) {
// fall throughg
// fall through
}
}
}

View File

@ -42,7 +42,7 @@ class UnusedAssignmentRemover
$chain_assignment = false;
if ($assign_stmt !== null && $assign_exp !== null) {
// Check if we have to remove assignment statemnt as expression (i.e. just "$var = ")
// Check if we have to remove assignment statement as expression (i.e. just "$var = ")
// Consider chain of assignments
$rhs_exp = $assign_exp->expr;

View File

@ -567,7 +567,7 @@ class FunctionLikeNodeScanner
if (isset($classlike_storage->properties[$param_storage->name]) && $param_storage->location) {
IssueBuffer::add(
new \Psalm\Issue\ParseError(
'Promoted propertty ' . $param_storage->name . ' clashes with an existing property',
'Promoted property ' . $param_storage->name . ' clashes with an existing property',
$param_storage->location
)
);

View File

@ -102,7 +102,7 @@ class ArrayColumnReturnTypeProvider implements \Psalm\Plugin\EventHandler\Functi
if ($input_array_not_empty && $result_element_type->possibly_undefined !== true) {
$have_at_least_one_res = true;
}
//array_column skips undefined elements so resulting type is necesseraly defined
//array_column skips undefined elements so resulting type is necessarily defined
$result_element_type->possibly_undefined = false;
} else {
$result_element_type = Type::getMixed();

View File

@ -765,7 +765,7 @@ class ParseTreeCreator
);
} else {
throw new TypeParseTreeException(
'Paranthesis must be preceded by “Closure”, “callable”, "pure-callable" or a valid @method name'
'Parenthesis must be preceded by “Closure”, “callable”, "pure-callable" or a valid @method name'
);
}

View File

@ -1071,7 +1071,7 @@ class TypeParser
$is_variadic
);
// type is not authoratative
// type is not authoritative
$param->signature_type = null;
return $param;