Skip to content
Permalink
Browse files

Mixed value object-likes should still have string keys

  • Loading branch information...
muglug committed Aug 27, 2019
1 parent 4db8ca6 commit 5a5629b835ec4cb7449d35b22c3209cc81dcd5fc
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/Psalm/Type/Atomic/ObjectLike.php
@@ -181,7 +181,7 @@ public function canBeFullyExpressedInPhp()
public function getGenericKeyType()
{
if ($this->had_mixed_value) {
return Type::getArrayKey();
return Type::getString();
}
$key_types = [];
@@ -233,7 +233,7 @@ public function getGenericValueType()
public function getGenericArrayType()
{
if ($this->had_mixed_value) {
return new TNonEmptyArray([Type::getArrayKey(), Type::getMixed()]);
return new TNonEmptyArray([Type::getString(), Type::getMixed()]);
}
$key_types = [];

0 comments on commit 5a5629b

Please sign in to comment.
You can’t perform that action at this time.