We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b052081 commit cb8c9f9Copy full SHA for cb8c9f9
src/Type.php
@@ -47,8 +47,7 @@ public static function tryFromValue(mixed $value): self|null
47
is_int($value) => Type::Integer,
48
is_float($value) => Type::Decimal,
49
is_bool($value) => Type::Boolean,
50
- is_string($value) && 1 === preg_match('/[^\x20-\x7f]/', $value) => Type::DisplayString,
51
- is_string($value) => Type::String,
+ is_string($value) => 1 === preg_match('/[^\x20-\x7f]/', $value) ? Type::DisplayString : Type::String,
52
default => null,
53
};
54
}
0 commit comments