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

Fix issues

This commit is contained in:
Brown 2020-08-15 01:18:29 -04:00
parent cdef4ec351
commit f12f4c8cb3

View File

@ -27,6 +27,7 @@ use function is_string;
use function in_array;
use Psalm\Issue\MissingImmutableAnnotation;
use function count;
use function substr;
class MethodComparator
{
@ -397,16 +398,17 @@ class MethodComparator
&& $implementer_param->location
&& $guide_method_storage->cased_name
&& substr($guide_method_storage->cased_name, 0, 2) !== '__'
&& $config->isInProjectDirs(
$implementer_param->location->file_path
)
) {
if ($config->allow_named_arg_calls
|| ($guide_classlike_storage->location
&& !$config->isInProjectDirs($guide_classlike_storage->location->file_path)
)
) {
if ($codebase->alter_code) {
if ($codebase->alter_code
&& $config->isInProjectDirs(
$implementer_param->location->file_path
)
) {
$project_analyzer = \Psalm\Internal\Analyzer\ProjectAnalyzer::getInstance();
if ($stmt && isset($project_analyzer->getIssuesToFix()['ParamNameMismatch'])) {
@ -434,6 +436,11 @@ class MethodComparator
. $guide_param->name . ' as defined by '
. $cased_guide_method_id,
$implementer_param->location
&& $config->isInProjectDirs(
$implementer_param->location->file_path
)
? $implementer_param->location
: $code_location
)
)) {
// fall through