Skip to content

Commit 5455dc5

Browse files
authored
Merge pull request #12 from veewee/allow-empty-enums
Allow empty enumeration strings
2 parents eaaa1b9 + b255ef4 commit 5455dc5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Metadata/Model/TypeMeta.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use function Psl\Type\non_empty_string;
1212
use function Psl\Type\optional;
1313
use function Psl\Type\shape;
14+
use function Psl\Type\string;
1415
use function Psl\Type\vec;
1516

1617
final class TypeMeta
@@ -31,7 +32,7 @@ final class TypeMeta
3132
private $docs;
3233

3334
/**
34-
* @var list<non-empty-string>|null
35+
* @var list<string>|null
3536
*/
3637
private $enums;
3738

@@ -171,7 +172,7 @@ public function withDocs(?string $docs): self
171172
}
172173

173174
/**
174-
* @return Option<list<non-empty-string>>
175+
* @return Option<list<string>>
175176
*/
176177
public function enums(): Option
177178
{
@@ -184,7 +185,7 @@ public function enums(): Option
184185
public function withEnums(?array $enums): self
185186
{
186187
$new = clone $this;
187-
$new->enums = optional(vec(non_empty_string()))->coerce($enums);
188+
$new->enums = optional(vec(string()))->coerce($enums);
188189

189190
return $new;
190191
}

0 commit comments

Comments
 (0)