minor #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
-------
7a8a72ddbf
[PropertyInfo] Remove a useless call to count() in SerializerExtractor
This commit is contained in:
commit
f5609e809c
@ -48,7 +48,7 @@ class SerializerExtractor implements PropertyListExtractorInterface
|
||||
$serializerClassMetadata = $this->classMetadataFactory->getMetadataFor($class);
|
||||
|
||||
foreach ($serializerClassMetadata->getAttributesMetadata() as $serializerAttributeMetadata) {
|
||||
if (count(array_intersect($context['serializer_groups'], $serializerAttributeMetadata->getGroups())) > 0) {
|
||||
if (array_intersect($context['serializer_groups'], $serializerAttributeMetadata->getGroups())) {
|
||||
$properties[] = $serializerAttributeMetadata->getName();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user