Skip to content

Commit f5609e8

Browse files
committed
minor symfony#22427 [PropertyInfo] Remove a useless call to count() in SerializerExtractor (dunglas)
This PR was merged into the 2.8 branch. Discussion ---------- [PropertyInfo] Remove a useless call to count() in SerializerExtractor | Q | A | ------------- | --- | Branch? | 2.8 <!-- see comment below --> | Bug fix? | no | New feature? | no <!-- don't forget updating src/**/CHANGELOG.md files --> | BC breaks? | no | Deprecations? | no <!-- don't forget updating UPGRADE-*.md files --> | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Commits ------- 7a8a72d [PropertyInfo] Remove a useless call to count() in SerializerExtractor
2 parents f3eaa78 + 7a8a72d commit f5609e8

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)