mirror of
https://github.com/danog/psalm-plugin-phpunit.git
synced 2024-12-02 09:27:56 +01:00
commit
562a1812ce
@ -14,12 +14,12 @@
|
||||
"sort-packages": true
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1.3 || ^8.0",
|
||||
"php": "^7.3 || ^8.0",
|
||||
"ext-simplexml": "*",
|
||||
"composer/semver": "^1.4 || ^2.0 || ^3.0",
|
||||
"composer/package-versions-deprecated": "^1.10",
|
||||
"phpunit/phpunit": "^7.5 || ^8.0 || ^9.0",
|
||||
"vimeo/psalm": "^3.6.2 || dev-master || dev-4.x"
|
||||
"vimeo/psalm": "dev-master || dev-4.x"
|
||||
},
|
||||
"require-dev": {
|
||||
"codeception/codeception": "^4.0.3",
|
||||
|
@ -343,7 +343,7 @@ class TestCaseHandler implements
|
||||
}
|
||||
};
|
||||
|
||||
/** @var Type\Atomic\TArray|Type\Atomic\ObjectLike|Type\Atomic\TList $dataset_type */
|
||||
/** @var Type\Atomic\TArray|Type\Atomic\TKeyedArray|Type\Atomic\TList $dataset_type */
|
||||
$dataset_type = self::getAtomics($provider_return_type->type_params[1])['array'];
|
||||
|
||||
if ($dataset_type instanceof Type\Atomic\TArray) {
|
||||
@ -363,7 +363,7 @@ class TestCaseHandler implements
|
||||
}
|
||||
$checkParam($potential_argument_type, $param->type, $param->is_optional, $param_offset);
|
||||
}
|
||||
} else { // ObjectLike
|
||||
} else { // TKeyedArray
|
||||
// iterate over all params checking if corresponding value type is acceptable
|
||||
// let's hope properties are sorted in array order
|
||||
$potential_argument_types = array_values($dataset_type->properties);
|
||||
@ -449,7 +449,7 @@ class TestCaseHandler implements
|
||||
if ($type instanceof Type\Atomic\TArray) {
|
||||
$key_types[] = $type->type_params[0] ?? Type::getMixed();
|
||||
$value_types[] = $type->type_params[1] ?? Type::getMixed();
|
||||
} elseif ($type instanceof Type\Atomic\ObjectLike) {
|
||||
} elseif ($type instanceof Type\Atomic\TKeyedArray) {
|
||||
$key_types[] = $type->getGenericKeyType();
|
||||
$value_types[] = $type->getGenericValueType();
|
||||
} elseif ($type instanceof Type\Atomic\TNamedObject || $type instanceof Type\Atomic\TIterable) {
|
||||
|
Loading…
Reference in New Issue
Block a user