diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeZoneToStringTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeZoneToStringTransformer.php index 32fa5d1129d5e..bec7509fb7fe8 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeZoneToStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeZoneToStringTransformer.php @@ -17,7 +17,7 @@ /** * Transforms between a timezone identifier string and a DateTimeZone object. * - * @author Roland Franssen + * @author Roland Franssen */ class DateTimeZoneToStringTransformer implements DataTransformerInterface { @@ -39,14 +39,14 @@ public function transform($dateTimeZone) if ($this->multiple) { if (!\is_array($dateTimeZone)) { - throw new TransformationFailedException('Expected an array.'); + throw new TransformationFailedException('Expected an array of \DateTimeZone objects.'); } return array_map([new self(), 'transform'], $dateTimeZone); } if (!$dateTimeZone instanceof \DateTimeZone) { - throw new TransformationFailedException('Expected a \DateTimeZone.'); + throw new TransformationFailedException('Expected a \DateTimeZone object.'); } return $dateTimeZone->getName(); @@ -63,14 +63,14 @@ public function reverseTransform($value) if ($this->multiple) { if (!\is_array($value)) { - throw new TransformationFailedException('Expected an array.'); + throw new TransformationFailedException('Expected an array of timezone identifier strings.'); } return array_map([new self(), 'reverseTransform'], $value); } if (!\is_string($value)) { - throw new TransformationFailedException('Expected a string.'); + throw new TransformationFailedException('Expected a timezone identifier string.'); } try { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy