Skip to content

Commit

Permalink
Add better string detection
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Jan 7, 2020
1 parent b351df0 commit ce5917c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,11 @@ function ($c) {
if ($stmt_left_type
&& $stmt_right_type
&& ($stmt_left_type->getId() === 'non-empty-string'
|| $stmt_right_type->getId() === 'non-empty-string')
|| $stmt_right_type->getId() === 'non-empty-string'
|| ($stmt_left_type->isSingleStringLiteral()
&& $stmt_left_type->getSingleStringLiteral()->value)
|| ($stmt_right_type->isSingleStringLiteral()
&& $stmt_right_type->getSingleStringLiteral()->value))
) {
$stmt_type = new Type\Union([new Type\Atomic\TNonEmptyString()]);
} else {
Expand Down

0 comments on commit ce5917c

Please # to comment.