Skip to content

Commit

Permalink
Merge branch '5.4' into 6.2
Browse files Browse the repository at this point in the history
* 5.4:
  fix style of label containing new lines in PUML dump
  [TwigBridge] Allow floats in html5 input type number field
  [Translation] Handle the translation of empty strings
  [VarDumper] Fix error when reflected class has default Enum parameter in constructor
  [FrameworkBundle] Fix denyAccessUnlessGranted for mixed attributes
  [Validator] Fix translation of AtLeastOneOf constraint message
  [Validator] Sync IBAN formats with Swift IBAN registry
  [String] Use same alphabet for ByteString::fromRandom tests
  Fix phpdocs in components
  • Loading branch information
nicolas-grekas committed Feb 24, 2023
2 parents 3db95d7 + e35b42d commit df95998
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
14 changes: 7 additions & 7 deletions Normalizer/CustomNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ public function denormalize(mixed $data, string $type, string $format = null, ar
/**
* Checks if the given class implements the NormalizableInterface.
*
* @param mixed $data Data to normalize
* @param string $format The format being (de-)serialized from or into
* @param array $context
* @param mixed $data Data to normalize
* @param string|null $format The format being (de-)serialized from or into
* @param array $context
*/
public function supportsNormalization(mixed $data, string $format = null /* , array $context = [] */): bool
{
Expand All @@ -50,10 +50,10 @@ public function supportsNormalization(mixed $data, string $format = null /* , ar
/**
* Checks if the given class implements the DenormalizableInterface.
*
* @param mixed $data Data to denormalize from
* @param string $type The class to which the data should be denormalized
* @param string $format The format being deserialized from
* @param array $context
* @param mixed $data Data to denormalize from
* @param string $type The class to which the data should be denormalized
* @param string|null $format The format being deserialized from
* @param array $context
*/
public function supportsDenormalization(mixed $data, string $type, string $format = null /* , array $context = [] */): bool
{
Expand Down
16 changes: 8 additions & 8 deletions Normalizer/DenormalizerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ interface DenormalizerInterface
/**
* Denormalizes data back into an object of the given class.
*
* @param mixed $data Data to restore
* @param string $type The expected class to instantiate
* @param string $format Format the given data was extracted from
* @param array $context Options available to the denormalizer
* @param mixed $data Data to restore
* @param string $type The expected class to instantiate
* @param string|null $format Format the given data was extracted from
* @param array $context Options available to the denormalizer
*
* @return mixed
*
Expand All @@ -49,10 +49,10 @@ public function denormalize(mixed $data, string $type, string $format = null, ar
/**
* Checks whether the given class is supported for denormalization by this normalizer.
*
* @param mixed $data Data to denormalize from
* @param string $type The class to which the data should be denormalized
* @param string $format The format being deserialized from
* @param array $context Options available to the denormalizer
* @param mixed $data Data to denormalize from
* @param string $type The class to which the data should be denormalized
* @param string|null $format The format being deserialized from
* @param array $context Options available to the denormalizer
*
* @return bool
*/
Expand Down
12 changes: 6 additions & 6 deletions Normalizer/NormalizerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ interface NormalizerInterface
/**
* Normalizes an object into a set of arrays/scalars.
*
* @param mixed $object Object to normalize
* @param string $format Format the normalization result will be encoded as
* @param array $context Context options for the normalizer
* @param mixed $object Object to normalize
* @param string|null $format Format the normalization result will be encoded as
* @param array $context Context options for the normalizer
*
* @return array|string|int|float|bool|\ArrayObject|null \ArrayObject is used to make sure an empty object is encoded as an object not an array
*
Expand All @@ -41,9 +41,9 @@ public function normalize(mixed $object, string $format = null, array $context =
/**
* Checks whether the given class is supported for normalization by this normalizer.
*
* @param mixed $data Data to normalize
* @param string $format The format being (de-)serialized from or into
* @param array $context Context options for the normalizer
* @param mixed $data Data to normalize
* @param string|null $format The format being (de-)serialized from or into
* @param array $context Context options for the normalizer
*
* @return bool
*/
Expand Down
14 changes: 7 additions & 7 deletions Serializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,9 @@ public function supportsDenormalization(mixed $data, string $type, string $forma
/**
* Returns a matching normalizer.
*
* @param mixed $data Data to get the serializer for
* @param string $format Format name, present to give the option to normalizers to act differently based on formats
* @param array $context Options available to the normalizer
* @param mixed $data Data to get the serializer for
* @param string|null $format Format name, present to give the option to normalizers to act differently based on formats
* @param array $context Options available to the normalizer
*/
private function getNormalizer(mixed $data, ?string $format, array $context): ?NormalizerInterface
{
Expand Down Expand Up @@ -278,10 +278,10 @@ private function getNormalizer(mixed $data, ?string $format, array $context): ?N
/**
* Returns a matching denormalizer.
*
* @param mixed $data Data to restore
* @param string $class The expected class to instantiate
* @param string $format Format name, present to give the option to normalizers to act differently based on formats
* @param array $context Options available to the denormalizer
* @param mixed $data Data to restore
* @param string $class The expected class to instantiate
* @param string|null $format Format name, present to give the option to normalizers to act differently based on formats
* @param array $context Options available to the denormalizer
*/
private function getDenormalizer(mixed $data, string $class, ?string $format, array $context): ?DenormalizerInterface
{
Expand Down

0 comments on commit df95998

Please sign in to comment.