← All changes
|
vendor/symfony/property-info/Extractor/SerializerExtractor.php
+3
-3
3.0.13
→
3.2.90
View file →
| @@ -28,9 +28,9 @@ | ||
| 28 | 28 | } |
| 29 | 29 | /** |
| 30 | 30 | * {@inheritdoc} |
| 31 | 31 | */ |
| 32 | - public function getProperties(string $class, array $context = []) : ?array | |
| 32 | + public function getProperties(string $class, array $context = []): ?array | |
| 33 | 33 | { |
| 34 | 34 | if (!\array_key_exists('serializer_groups', $context) || null !== $context['serializer_groups'] && !\is_array($context['serializer_groups'])) { |
| 35 | 35 | return null; |
| 36 | 36 | } |
| @@ -39,10 +39,10 @@ | ||
| 39 | 39 | } |
| 40 | 40 | $properties = []; |
| 41 | 41 | $serializerClassMetadata = $this->classMetadataFactory->getMetadataFor($class); |
| 42 | 42 | foreach ($serializerClassMetadata->getAttributesMetadata() as $serializerAttributeMetadata) { |
| 43 | - $ignored = \method_exists($serializerAttributeMetadata, 'isIgnored') && $serializerAttributeMetadata->isIgnored(); | |
| 44 | - if (!$ignored && (null === $context['serializer_groups'] || \array_intersect($context['serializer_groups'], $serializerAttributeMetadata->getGroups()))) { | |
| 43 | + $ignored = method_exists($serializerAttributeMetadata, 'isIgnored') && $serializerAttributeMetadata->isIgnored(); | |
| 44 | + if (!$ignored && (null === $context['serializer_groups'] || array_intersect($context['serializer_groups'], $serializerAttributeMetadata->getGroups()))) { | |
| 45 | 45 | $properties[] = $serializerAttributeMetadata->getName(); |
| 46 | 46 | } |
| 47 | 47 | } |
| 48 | 48 | return $properties; |