8000 Review · symfony/symfony@f9e36ab · GitHub
[go: up one dir, main page]

Skip to content

Commit f9e36ab

Browse files
Review
1 parent 0a19d7a commit f9e36ab

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

src/Symfony/Component/Form/DataTransformerInterface.php

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
*
1919
* @author Bernhard Schussek <bschussek@gmail.com>
2020
*
21-
* @template T
22-
* @template R
21+
* @template TValue
22+
* @template TTransformedValue
2323
*/
2424
interface DataTransformerInterface
2525
{
@@ -56,11 +56,9 @@ interface DataTransformerInterface
5656
* of the first data transformer outputs NULL, the second must be able to
5757
* process that value.
5858
*
59-
* @param mixed $value The value in the original representation
60-
* @psalm-param T|null $value
59+
* @param TValue|null $value The value in the original representation
6160
*
62-
* @return mixed
63-
* @psalm-return R|null
61+
* @return TTransformedValue|null
6462
*
6563
* @throws TransformationFailedException when the transformation fails
6664
*/
@@ -87,11 +85,9 @@ public function transform(mixed $value);
8785
* By convention, reverseTransform() should return NULL if an empty string
8886
* is passed.
8987
*
90-
* @param mixed $value The value in the transformed representation
91-
* @psalm-param R|null $value
88+
* @param TTransformedValue|null $value The value in the transformed representation
9289
*
93-
* @return mixed
94-
* @psalm-return T|null
90+
* @return TValue|null
9591
*
9692
* @throws TransformationFailedException when the transformation fails
9793
*/

src/Symfony/Component/Form/Extension/Core/DataTransformer/BaseDateTimeTransformer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
use Symfony\Component\Form\Exception\InvalidArgumentException;
1616

1717
/**
18-
* @template R
19-
* @implements DataTransformerInterface<\DateTimeInterface, R>
18+
* @template TTransformedValue
19+
* @implements DataTransformerInterface<\DateTimeInterface, TTransformedValue>
2020
*/
2121
abstract class BaseDateTimeTransformer implements DataTransformerInterface
2222
{

src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class DateTimeToHtml5LocalDateTimeTransformer extends BaseDateTimeTransformer
3131
* input is an RFC3339 date followed by 'T', followed by an RFC3339 time.
3232
* https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-local-date-and-time-string
3333
*
34-
* @param \DateTimeInterface $dateTime A DateTime object
34+
* @param \DateTimeInterface $dateTime
3535
*
3636
* @throws TransformationFailedException If the given value is not an
3737
* instance of \DateTime or \DateTimeInterface

0 commit comments

Comments
 (0)
0