From d0fe1528b6595b5233c0789a836cc4676e119a4b Mon Sep 17 00:00:00 2001 From: orklah Date: Thu, 29 Jul 2021 20:59:52 +0200 Subject: [PATCH] fix typos --- .../Analyzer/Statements/Block/IfConditionalAnalyzer.php | 2 +- .../Internal/Analyzer/Statements/Block/IfElse/IfAnalyzer.php | 2 +- .../Internal/Analyzer/Statements/Block/IfElseAnalyzer.php | 2 +- .../Analyzer/Statements/Expression/AssignmentAnalyzer.php | 2 +- .../Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php | 4 ++-- src/Psalm/Internal/Analyzer/Statements/ReturnAnalyzer.php | 4 ++-- .../Internal/Analyzer/Statements/UnusedAssignmentRemover.php | 2 +- .../Internal/PhpVisitor/Reflector/FunctionLikeNodeScanner.php | 2 +- .../ReturnTypeProvider/ArrayColumnReturnTypeProvider.php | 2 +- src/Psalm/Internal/Type/ParseTreeCreator.php | 2 +- src/Psalm/Internal/Type/TypeParser.php | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Psalm/Internal/Analyzer/Statements/Block/IfConditionalAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Block/IfConditionalAnalyzer.php index f2eb3d88837..edb08413c00 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Block/IfConditionalAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Block/IfConditionalAnalyzer.php @@ -269,7 +269,7 @@ function (Type\Union $_): bool { } } - // 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); diff --git a/src/Psalm/Internal/Analyzer/Statements/Block/IfElse/IfAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Block/IfElse/IfAnalyzer.php index c2b572e9224..8b277f8e62e 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Block/IfElse/IfAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Block/IfElse/IfAnalyzer.php @@ -343,7 +343,7 @@ public static function addConditionallyAssignedVarsToContext( 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) { diff --git a/src/Psalm/Internal/Analyzer/Statements/Block/IfElseAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Block/IfElseAnalyzer.php index d73d33ee0f9..93241c26772 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Block/IfElseAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Block/IfElseAnalyzer.php @@ -195,7 +195,7 @@ function ($c) use ($reconciled_expression_clauses): bool { } } - // 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 { diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/AssignmentAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/AssignmentAnalyzer.php index 6a163af5e1f..7a6612e43f3 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/AssignmentAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/AssignmentAnalyzer.php @@ -1394,7 +1394,7 @@ private static function analyzeDestructuringAssignment( } 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], diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php index 3c0deea791d..41dc097ad71 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php @@ -102,7 +102,7 @@ public static function analyze( foreach ($args as $argument_offset => $arg) { if ($function_params === null) { - if (self::evaluateAribitraryParam( + if (self::evaluateArbitraryParam( $statements_analyzer, $arg, $context @@ -1058,7 +1058,7 @@ private static function handlePossiblyMatchingByRefParam( /** * @return false|null */ - private static function evaluateAribitraryParam( + private static function evaluateArbitraryParam( StatementsAnalyzer $statements_analyzer, PhpParser\Node\Arg $arg, Context $context diff --git a/src/Psalm/Internal/Analyzer/Statements/ReturnAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/ReturnAnalyzer.php index 56ba7b6e984..445279ec270 100644 --- a/src/Psalm/Internal/Analyzer/Statements/ReturnAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/ReturnAnalyzer.php @@ -428,7 +428,7 @@ public static function analyze( ), $statements_analyzer->getSuppressedIssues() )) { - // fall throuhg + // fall through } } @@ -523,7 +523,7 @@ public static function analyze( ), $statements_analyzer->getSuppressedIssues() )) { - // fall throughg + // fall through } } } diff --git a/src/Psalm/Internal/Analyzer/Statements/UnusedAssignmentRemover.php b/src/Psalm/Internal/Analyzer/Statements/UnusedAssignmentRemover.php index 6f13e691929..1308abd2cbf 100644 --- a/src/Psalm/Internal/Analyzer/Statements/UnusedAssignmentRemover.php +++ b/src/Psalm/Internal/Analyzer/Statements/UnusedAssignmentRemover.php @@ -42,7 +42,7 @@ public function findUnusedAssignment( $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; diff --git a/src/Psalm/Internal/PhpVisitor/Reflector/FunctionLikeNodeScanner.php b/src/Psalm/Internal/PhpVisitor/Reflector/FunctionLikeNodeScanner.php index 17ebc03ed77..438a2f83379 100644 --- a/src/Psalm/Internal/PhpVisitor/Reflector/FunctionLikeNodeScanner.php +++ b/src/Psalm/Internal/PhpVisitor/Reflector/FunctionLikeNodeScanner.php @@ -567,7 +567,7 @@ public function start(PhpParser\Node\FunctionLike $stmt, bool $fake_method = fal 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 ) ); diff --git a/src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayColumnReturnTypeProvider.php b/src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayColumnReturnTypeProvider.php index 371b0f67339..275c7977148 100644 --- a/src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayColumnReturnTypeProvider.php +++ b/src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayColumnReturnTypeProvider.php @@ -102,7 +102,7 @@ public static function getFunctionReturnType(FunctionReturnTypeProviderEvent $ev 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(); diff --git a/src/Psalm/Internal/Type/ParseTreeCreator.php b/src/Psalm/Internal/Type/ParseTreeCreator.php index c258677f64d..4c70e4ff384 100644 --- a/src/Psalm/Internal/Type/ParseTreeCreator.php +++ b/src/Psalm/Internal/Type/ParseTreeCreator.php @@ -765,7 +765,7 @@ private function handleValue(array $type_token) : void ); } 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' ); } diff --git a/src/Psalm/Internal/Type/TypeParser.php b/src/Psalm/Internal/Type/TypeParser.php index 6f15cbe1bb3..b877fec3ce0 100644 --- a/src/Psalm/Internal/Type/TypeParser.php +++ b/src/Psalm/Internal/Type/TypeParser.php @@ -1071,7 +1071,7 @@ function (ParseTree $child_tree) use ( $is_variadic ); - // type is not authoratative + // type is not authoritative $param->signature_type = null; return $param;