Skip to content

Commit cb8c9f9

Browse files
committed
Update the documentation to add the DisplayString class
1 parent b052081 commit cb8c9f9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Type.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ public static function tryFromValue(mixed $value): self|null
4747
is_int($value) => Type::Integer,
4848
is_float($value) => Type::Decimal,
4949
is_bool($value) => Type::Boolean,
50-
is_string($value) && 1 === preg_match('/[^\x20-\x7f]/', $value) => Type::DisplayString,
51-
is_string($value) => Type::String,
50+
is_string($value) => 1 === preg_match('/[^\x20-\x7f]/', $value) ? Type::DisplayString : Type::String,
5251
default => null,
5352
};
5453
}

0 commit comments

Comments
 (0)