Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
27pchrisl committed Mar 23, 2024
1 parent 7a8ffac commit d175a87
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Type/String_.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Flat3\Lodata\PathSegment\OpenAPI;
use Flat3\Lodata\Primitive;
use Flat3\Lodata\Property;
use UnitEnum;

/**
* String
Expand Down Expand Up @@ -42,6 +43,10 @@ public static function escape(string $value): string

public function set($value): self
{
if ($value instanceof UnitEnum) {
$value = $value->value;
}

$this->value = null === $value ? null : (string) $value;

return $this;
Expand Down

0 comments on commit d175a87

Please sign in to comment.