src/Metadata/Property/Factory/SerializerPropertyMetadataFactory.php
private function getPropertySerializerGroups(string $resourceClass, string $property): array
    {
        $serializerClassMetadata = $this->serializerClassMetadataFactory->getMetadataFor($resourceClass);

        foreach ($serializerClassMetadata->getAttributesMetadata() as $serializerAttributeMetadata) {
            if ($property === $serializerAttributeMetadata->getName()) {
                return $serializerAttributeMetadata->getGroups();
            }
        }

        return [];
    }
private function getPropertySerializerGroups(string $resourceClass, string $property): array
    {
        $serializerClassMetadata = $this->serializerClassMetadataFactory->getMetadataFor($resourceClass);

        foreach ($serializerClassMetadata->getAttributesMetadata() as $serializerAttributeMetadata) {
            if ($property === $serializerAttributeMetadata->getName()) {
                return $serializerAttributeMetadata->getGroups();
            }
        }

        return [];
    }
private function getPropertySerializerGroups ( string $ resourceClass , string $ property ) : array { $ serializerClassMetadata = $ this -> serializerClassMetadataFactory -> getMetadataFor ( $ resourceClass ) ; foreach ( $ serializerClassMetadata -> getAttributesMetadata ( ) as $ serializerAttributeMetadata ) { if ( $ property === $ serializerAttributeMetadata -> getName ( ) ) { return $ serializerAttributeMetadata -> getGroups ( ) ; } } return [ ] ; }
Gets the serializer groups defined on a property.

@return string[]
Gets the serializer groups defined on a property .