Skip to content

Commit aaf2812

Browse files
authored
Merge pull request #236 from wlkns/patch-1
Support Enums in ValueFormatter.php
2 parents da3a01f + 3f57919 commit aaf2812

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Quote/ValueFormatter.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ public static function formatValue($value, bool $addQuotes = true)
4242
return $value->getValue();
4343
}
4444

45+
if (is_object($value) && property_exists($value, 'value')) {
46+
return $value->value;
47+
}
48+
4549
if (is_object($value) && is_callable([$value, '__toString'])) {
4650
$value = (string) $value;
4751
}

0 commit comments

Comments
 (0)