Skip to content

Commit

Permalink
Merge pull request #7077 from ricardoboss/issue-6964-refinement-unite…
Browse files Browse the repository at this point in the history
…num-name-property
  • Loading branch information
weirdan authored Dec 5, 2021
2 parents 056497e + 2ec77fe commit 4a35a85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public static function analyze(
new Type\Union([new Type\Atomic\TLiteralString($lhs_type_part->case_name)])
);
} else {
$statements_analyzer->node_data->setType($stmt, Type::getString());
$statements_analyzer->node_data->setType($stmt, Type::getNonEmptyString());
}
} else {
self::handleNonExistentProperty(
Expand Down
3 changes: 3 additions & 0 deletions tests/EnumTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ enum Status
case PUBLISHED;
case ARCHIVED;
/**
* @return non-empty-string
*/
public function get(): string
{
return $this->name;
Expand Down

0 comments on commit 4a35a85

Please sign in to comment.