Skip to content

Commit 7a8a72d

Browse files
committed
[PropertyInfo] Remove a useless call to count() in SerializerExtractor
1 parent d564c6a commit 7a8a72d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/PropertyInfo/Extractor/SerializerExtractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function getProperties($class, array $context = array())
4848
$serializerClassMetadata = $this->classMetadataFactory->getMetadataFor($class);
4949

5050
foreach ($serializerClassMetadata->getAttributesMetadata() as $serializerAttributeMetadata) {
51-
if (count(array_intersect($context['serializer_groups'], $serializerAttributeMetadata->getGroups())) > 0) {
51+
if (array_intersect($context['serializer_groups'], $serializerAttributeMetadata->getGroups())) {
5252
$properties[] = $serializerAttributeMetadata->getName();
5353
}
5454
}

0 commit comments

Comments
 (0)