diff --git a/composer.json b/composer.json index 4b2db45..0b5c3a9 100755 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/src/Hooks/TestCaseHandler.php b/src/Hooks/TestCaseHandler.php index 4fa4098..7d49980 100644 --- a/src/Hooks/TestCaseHandler.php +++ b/src/Hooks/TestCaseHandler.php @@ -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) {