1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

Fix issues that improved array checks found

This commit is contained in:
Matthew Brown 2017-11-19 12:14:02 -05:00
parent 39baa00fd3
commit 1a39224abc
4 changed files with 6 additions and 3 deletions

View File

@ -59,7 +59,7 @@ trait CanAlias
$project_checker->use_referencing_locations[strtolower($use_path)][$this->getFilePath()][] =
new \Psalm\CodeLocation($this, $use);
$project_checker->use_referencing_locations[$this->getFilePath()][strtolower($use_path)] = true;
$project_checker->use_referencing_files[$this->getFilePath()][strtolower($use_path)] = true;
}
$this->aliased_classes[strtolower($use->alias)] = $use_path;
@ -96,7 +96,7 @@ trait CanAlias
// register the path
$project_checker = $this->getFileChecker()->project_checker;
$project_checker->use_referencing_locations[$use_path][$this->getFilePath()] =
$project_checker->use_referencing_locations[$use_path][$this->getFilePath()][] =
new \Psalm\CodeLocation($this, $use);
}

View File

@ -693,6 +693,7 @@ class Config
* @return void
* @psalm-suppress InvalidPropertyAssignment
* @psalm-suppress MixedAssignment
* @psalm-suppress MixedArrayOffset
*/
public function collectPredefinedFunctions()
{

View File

@ -100,6 +100,8 @@ class AnnotationTest extends TestCase
}
}
}',
'assertions' => [],
'error_level' => ['MixedArrayOffset'],
],
'goodDocblock' => [
'<?php

View File

@ -11,7 +11,7 @@ class TypeCombinationTest extends TestCase
* @dataProvider providerTestValidTypeCombination
*
* @param string $expected
* @param array<string> $types
* @param array<int, string> $types
*
* @return void
*/