diff --git a/config.xsd b/config.xsd index 15308b1f4..037c82cd5 100644 --- a/config.xsd +++ b/config.xsd @@ -73,8 +73,8 @@ - - + + diff --git a/docs/running_psalm/issues/ParamNameMismatch.md b/docs/running_psalm/issues/ParamNameMismatch.md index 46f688775..c0a2fb412 100644 --- a/docs/running_psalm/issues/ParamNameMismatch.md +++ b/docs/running_psalm/issues/ParamNameMismatch.md @@ -46,9 +46,9 @@ class AChild extends A { ## Workarounds -### @no-named-params +### @no-named-arguments -Alternatively you can ignore this issue by adding a `@no-named-params` annotation to the parent method: +Alternatively you can ignore this issue by adding a `@no-named-arguments` annotation to the parent method: ```php 'seal_all_methods', 'runTaintAnalysis' => 'run_taint_analysis', 'usePhpStormMetaPath' => 'use_phpstorm_meta_path', - 'allowInternalNamedParamCalls' => 'allow_internal_named_param_calls', - 'allowNamedParamCalls' => 'allow_named_param_calls', + 'allowInternalNamedArgumentsCalls' => 'allow_internal_named_arg_calls', + 'allowNamedArgumentCalls' => 'allow_named_arg_calls', ]; foreach ($booleanAttributes as $xmlName => $internalName) { diff --git a/src/Psalm/Internal/Analyzer/CommentAnalyzer.php b/src/Psalm/Internal/Analyzer/CommentAnalyzer.php index 0a135e184..b6d7647c4 100644 --- a/src/Psalm/Internal/Analyzer/CommentAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/CommentAnalyzer.php @@ -756,8 +756,8 @@ class CommentAnalyzer $info->external_mutation_free = true; } - if (isset($parsed_docblock->tags['no-named-params'])) { - $info->no_named_params = true; + if (isset($parsed_docblock->tags['no-named-arguments'])) { + $info->no_named_args = true; } $info->ignore_nullable_return = isset($parsed_docblock->tags['psalm-ignore-nullable-return']); diff --git a/src/Psalm/Internal/Analyzer/MethodComparator.php b/src/Psalm/Internal/Analyzer/MethodComparator.php index b695eb54d..045aa4106 100644 --- a/src/Psalm/Internal/Analyzer/MethodComparator.php +++ b/src/Psalm/Internal/Analyzer/MethodComparator.php @@ -383,14 +383,14 @@ class MethodComparator } if ($guide_param->name !== $implementer_param->name - && $guide_method_storage->allow_named_param_calls + && $guide_method_storage->allow_named_arg_calls && count($implementer_method_storage->params) > 1 && $guide_classlike_storage->user_defined && $implementer_classlike_storage->user_defined ) { $config = \Psalm\Config::getInstance(); - if ($config->allow_named_param_calls + if ($config->allow_named_arg_calls || ($guide_classlike_storage->location && !$config->isInProjectDirs($guide_classlike_storage->location->file_path) ) diff --git a/src/Psalm/Internal/PhpVisitor/ReflectorVisitor.php b/src/Psalm/Internal/PhpVisitor/ReflectorVisitor.php index c6c97ed85..a640e2c79 100644 --- a/src/Psalm/Internal/PhpVisitor/ReflectorVisitor.php +++ b/src/Psalm/Internal/PhpVisitor/ReflectorVisitor.php @@ -2286,11 +2286,11 @@ class ReflectorVisitor extends PhpParser\NodeVisitorAbstract implements PhpParse } if (($storage->internal || ($class_storage && $class_storage->internal)) - && !$this->config->allow_internal_named_param_calls + && !$this->config->allow_internal_named_arg_calls ) { - $storage->allow_named_param_calls = false; - } elseif ($docblock_info->no_named_params) { - $storage->allow_named_param_calls = false; + $storage->allow_named_arg_calls = false; + } elseif ($docblock_info->no_named_args) { + $storage->allow_named_arg_calls = false; } if ($docblock_info->variadic) { diff --git a/src/Psalm/Internal/Scanner/FunctionDocblockComment.php b/src/Psalm/Internal/Scanner/FunctionDocblockComment.php index 8b5083618..031445a49 100644 --- a/src/Psalm/Internal/Scanner/FunctionDocblockComment.php +++ b/src/Psalm/Internal/Scanner/FunctionDocblockComment.php @@ -192,5 +192,5 @@ class FunctionDocblockComment /** * @var bool */ - public $no_named_params = false; + public $no_named_args = false; } diff --git a/src/Psalm/Storage/FunctionLikeStorage.php b/src/Psalm/Storage/FunctionLikeStorage.php index a678c6aaf..e817a2b03 100644 --- a/src/Psalm/Storage/FunctionLikeStorage.php +++ b/src/Psalm/Storage/FunctionLikeStorage.php @@ -202,7 +202,7 @@ abstract class FunctionLikeStorage /** * @var bool */ - public $allow_named_param_calls = true; + public $allow_named_arg_calls = true; public function __toString() {