[DoctrineBridge] Simpler result checking in UniqueEntityValidator
[DoctrineBridge] Simpler result checking in UniqueEntityValidator

In 928e352d09a6bb0b566e61bc7482ead1d4859442, support for MongoDB cursors was implemented by converting an Iterable, non-ArrayAccess object to an array. The ArrayAccess check didn't seem purposeful, since cursors are only Iterable and ORM returns real arrays. Since we only need to access the first element of the cursor (and only in cases where the count is exactly 1), we can simply use current() to handle Iterables and arrays.
takeit/DoctrineBridge,symfony/DoctrineBridge,symfony/doctrine-bridge