From 796f2fff9b3dc56c33c679bca6d17c943c41fa38 Mon Sep 17 00:00:00 2001 From: Roland Franssen Date: Fri, 26 Apr 2019 18:22:08 +0200 Subject: [PATCH] [Form] Fix author tag + exception messages --- .../DateTimeZoneToStringTransformer.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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