8000 Document null support in NumberToLocalizedStringTransformer · symfony/symfony@1fda3d0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1fda3d0

Browse files
committed
Document null support in NumberToLocalizedStringTransformer
1 parent 9b89b2e commit 1fda3d0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function __construct(?int $scale = 2, ?bool $grouping = true, ?int $round
4545
/**
4646
* Transforms a normalized format into a localized money string.
4747
*
48-
* @param int|float $value Normalized number
48+
* @param int|float|null $value Normalized number
4949
*
5050
* @return string Localized money string
5151
*
@@ -69,7 +69,7 @@ public function transform($value)
6969
*
7070
* @param string $value Localized money string
7171
*
72-
* @return int|float Normalized number
72+
* @return int|float|null Normalized number
7373
*
7474
* @throws TransformationFailedException if the given value is not a string
7575
* or if the value can not be transformed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function __construct(int $scale = null, ?bool $grouping = false, ?int $ro
9898
/**
9999
* Transforms a number type into localized number.
100100
*
101-
* @param int|float $value Number value
101+
* @param int|float|null $value Number value
102102
*
103103
* @return string Localized value
104104
*
@@ -133,7 +133,7 @@ public function transform($value)
133133
*
134134
* @param string $value The localized value
135135
*
136-
* @return int|float The numeric value
136+
* @return int|float|null The numeric value
137137
*
138138
* @throws TransformationFailedException if the given value is not a string
139139
* or if the value can not be transformed

0 commit comments

Comments
 (0)
0