Skip to content

Commit

Permalink
Merge pull request #6 from CvekCoding/master
Browse files Browse the repository at this point in the history
Fix condition - check interface

Closes #5
  • Loading branch information
johanderuijter authored Jul 31, 2020
2 parents 02bd9dc + 4f5255b commit 38a9fbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/UuidBinaryType.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function convertToDatabaseValue($value): ?Binary
if (is_string($value) && Uuid::isValid($value)) {
$value = Uuid::fromString($value);
}
if ($value instanceof Uuid) {
if ($value instanceof UuidInterface) {
return new Binary($value->getBytes(), Binary::TYPE_UUID);
}
throw ConversionException::conversionFailed($value, self::NAME);
Expand Down

0 comments on commit 38a9fbc

Please sign in to comment.