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:
parent
39baa00fd3
commit
1a39224abc
@ -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);
|
||||
}
|
||||
|
||||
|
@ -693,6 +693,7 @@ class Config
|
||||
* @return void
|
||||
* @psalm-suppress InvalidPropertyAssignment
|
||||
* @psalm-suppress MixedAssignment
|
||||
* @psalm-suppress MixedArrayOffset
|
||||
*/
|
||||
public function collectPredefinedFunctions()
|
||||
{
|
||||
|
@ -100,6 +100,8 @@ class AnnotationTest extends TestCase
|
||||
}
|
||||
}
|
||||
}',
|
||||
'assertions' => [],
|
||||
'error_level' => ['MixedArrayOffset'],
|
||||
],
|
||||
'goodDocblock' => [
|
||||
'<?php
|
||||
|
@ -11,7 +11,7 @@ class TypeCombinationTest extends TestCase
|
||||
* @dataProvider providerTestValidTypeCombination
|
||||
*
|
||||
* @param string $expected
|
||||
* @param array<string> $types
|
||||
* @param array<int, string> $types
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user