Skip to content

Commit

Permalink
Merge pull request #6205 from orklah/typos
Browse files Browse the repository at this point in the history
fix typos
  • Loading branch information
weirdan authored Jul 29, 2021
2 parents 89ee1f1 + d0fe152 commit 4cb9d8c
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/Psalm/Internal/Analyzer/Statements/ReturnAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ public static function analyze(
),
$statements_analyzer->getSuppressedIssues()
)) {
// fall throuhg
// fall through
}
}

Expand Down Expand Up @@ -523,7 +523,7 @@ public static function analyze(
),
$statements_analyzer->getSuppressedIssues()
)) {
// fall throughg
// fall through
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Type/ParseTreeCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Type/TypeParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ function (ParseTree $child_tree) use (
$is_variadic
);

// type is not authoratative
// type is not authoritative
$param->signature_type = null;

return $param;
Expand Down

0 comments on commit 4cb9d8c

Please sign in to comment.