File tree 5 files changed +8
-8
lines changed
src/Symfony/Component/Form/Extension/Core/DataTransformer 5 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ abstract class BaseDateTimeTransformer implements DataTransformerInterface
36
36
*
37
37
* @param string $inputTimezone The name of the input timezone
38
38
* @param string $outputTimezone The name of the output timezone
39
- * @param bool $immutable If the datetime is immutable
39
+ * @param bool $immutable Whether to use \DateTimeImmutable instead of \DateTime
40
40
*
41
41
* @throws UnexpectedTypeException if a timezone is not a string
42
42
* @throws InvalidArgumentException if a timezone is not valid
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ class DateTimeToArrayTransformer extends BaseDateTimeTransformer
33
33
* @param string $outputTimezone The output timezone
34
34
* @param array $fields The date fields
35
35
* @param bool $pad Whether to use padding
36
- * @param bool $immutable If the datetime is immutable
36
+ * @param bool $immutable Whether to use \DateTimeImmutable instead of \DateTime
37
37
*
38
38
* @throws UnexpectedTypeException if a timezone is not a string
39
39
*/
@@ -109,7 +109,7 @@ public function transform($dateTime)
109
109
*
110
110
* @param array $value Localized date
111
111
*
112
- * @return \DateTime Normalized date
112
+ * @return \DateTimeInterface Normalized date
113
113
*
114
114
* @throws TransformationFailedException If the given value is not an array,
115
115
* if the value could not be transformed
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ class DateTimeToLocalizedStringTransformer extends BaseDateTimeTransformer
38
38
* @param int $timeFormat The time format
39
39
* @param int $calendar One of the \IntlDateFormatter calendar constants
40
40
* @param string $pattern A pattern to pass to \IntlDateFormatter
41
- * @param bool $immutable If the datetime is immutable
41
+ * @param bool $immutable Whether to use \DateTimeImmutable instead of \DateTime
42
42
*
43
43
* @throws UnexpectedTypeException If a format is not supported or if a timezone is not a string
44
44
*/
@@ -102,7 +102,7 @@ public function transform($dateTime)
102
102
*
103
103
* @param string|array $value Localized date string/array
104
104
*
105
- * @return \DateTime Normalized date
105
+ * @return \DateTimeInterface Normalized date
106
106
*
107
107
* @throws TransformationFailedException if the given value is not a string,
108
108
* if the date could not be parsed
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ public function transform($dateTime)
53
53
*
54
54
* @param string $rfc3339 Formatted string
55
55
*
56
- * @return \DateTime Normalized date
56
+ * @return \DateTimeInterface Normalized date
57
57
*
58
58
* @throws TransformationFailedException If the given value is not a string,
59
59
* if the value could not be transformed
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ class DateTimeToStringTransformer extends BaseDateTimeTransformer
58
58
* @param string $outputTimezone The name of the output timezone
59
59
* @param string $format The date format
60
60
* @param bool $parseUsingPipe Whether to parse by appending a pipe "|" to the parse format
61
- * @param bool $immutable If the datetime is immutable
61
+ * @param bool $immutable Whether to use \DateTimeImmutable instead of \DateTime
62
62
*
63
63
* @throws UnexpectedTypeException if a timezone is not a string
64
64
*/
@@ -116,7 +116,7 @@ public function transform($dateTime)
116
116
*
117
117
* @param string $value A value as produced by PHP's date() function
118
118
*
119
- * @return \DateTime An instance of \DateTime
119
+ * @return \DateTimeInterface An instance of \DateTime
120
120
*
121
121
* @throws TransformationFailedException If the given value is not a string,
122
122
* or could not be transformed
You can’t perform that action at this time.
0 commit comments