minor #17429 [Serializer] Minor: fix CS and PHPDoc (dunglas)
This PR was squashed before being merged into the 2.7 branch (closes #17429).
Discussion
----------
[Serializer] Minor: fix CS and PHPDoc
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
ff568dc
[Serializer] Minor: fix CS and PHPDoc
This commit is contained in:
commit
55a79cb0fe
@ -27,10 +27,12 @@ class ClassMetadataFactory implements ClassMetadataFactoryInterface
|
||||
* @var LoaderInterface
|
||||
*/
|
||||
private $loader;
|
||||
|
||||
/**
|
||||
* @var Cache
|
||||
*/
|
||||
private $cache;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
|
@ -65,6 +65,7 @@ class YamlFileLoader extends FileLoader
|
||||
|
||||
if (isset($yaml['attributes']) && is_array($yaml['attributes'])) {
|
||||
$attributesMetadata = $classMetadata->getAttributesMetadata();
|
||||
|
||||
foreach ($yaml['attributes'] as $attribute => $data) {
|
||||
if (isset($attributesMetadata[$attribute])) {
|
||||
$attributeMetadata = $attributesMetadata[$attribute];
|
||||
|
@ -22,6 +22,7 @@ class CamelCaseToSnakeCaseNameConverter implements NameConverterInterface
|
||||
* @var array|null
|
||||
*/
|
||||
private $attributes;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
|
@ -35,26 +35,32 @@ abstract class AbstractNormalizer extends SerializerAwareNormalizer implements N
|
||||
* @var int
|
||||
*/
|
||||
protected $circularReferenceLimit = 1;
|
||||
|
||||
/**
|
||||
* @var callable
|
||||
*/
|
||||
protected $circularReferenceHandler;
|
||||
|
||||
/**
|
||||
* @var ClassMetadataFactoryInterface|null
|
||||
*/
|
||||
protected $classMetadataFactory;
|
||||
|
||||
/**
|
||||
* @var NameConverterInterface|null
|
||||
*/
|
||||
protected $nameConverter;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $callbacks = array();
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $ignoredAttributes = array();
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
|
@ -41,18 +41,22 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz
|
||||
* @var Encoder\ChainEncoder
|
||||
*/
|
||||
protected $encoder;
|
||||
|
||||
/**
|
||||
* @var Encoder\ChainDecoder
|
||||
*/
|
||||
protected $decoder;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $normalizers = array();
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $normalizerCache = array();
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
@ -247,8 +251,10 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz
|
||||
}
|
||||
|
||||
foreach ($this->normalizers as $normalizer) {
|
||||
if ($normalizer instanceof DenormalizerInterface
|
||||
&& $normalizer->supportsDenormalization($data, $class, $format)) {
|
||||
if (
|
||||
$normalizer instanceof DenormalizerInterface &&
|
||||
$normalizer->supportsDenormalization($data, $class, $format)
|
||||
) {
|
||||
return $normalizer->denormalize($data, $class, $format, $context);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user