Adjust check

This commit is contained in:
Benjamin Eberlei 2011-12-12 22:09:04 +01:00 committed by Christophe Coevoet
parent 3b5c617ad0
commit 988c2a525e

View File

@ -85,10 +85,10 @@ class EntitiesToArrayTransformer implements DataTransformerInterface
}
$entities = $this->choiceList->getEntitiesByKeys($keys);
if (count($keys) != count($entities)) {
if (count($keys) !== count($entities)) {
throw new TransformationFailedException('Not all entities matching the keys were found.');
}
foreach ($entities as $entity) {
$collection->add($entity);
}