src/Visitor/Csv/CsvSerializationVisitor.php 1 location
|
@@ 89-98 (lines=10) @@
|
86 |
|
/** |
87 |
|
* {@inheritdoc} |
88 |
|
*/ |
89 |
|
public function visitFloat($data, TypeMetadataInterface $type, ContextInterface $context) |
90 |
|
{ |
91 |
|
$data = (string) $data; |
92 |
|
|
93 |
|
if (strpos($data, '.') === false) { |
94 |
|
$data .= '.0'; |
95 |
|
} |
96 |
|
|
97 |
|
return $this->visitData($data, $type, $context); |
98 |
|
} |
99 |
|
|
100 |
|
/** |
101 |
|
* {@inheritdoc} |
src/Visitor/Xml/XmlSerializationVisitor.php 1 location
|
@@ 134-143 (lines=10) @@
|
131 |
|
/** |
132 |
|
* {@inheritdoc} |
133 |
|
*/ |
134 |
|
public function visitFloat($data, TypeMetadataInterface $type, ContextInterface $context) |
135 |
|
{ |
136 |
|
$data = (string) $data; |
137 |
|
|
138 |
|
if (strpos($data, '.') === false) { |
139 |
|
$data .= '.0'; |
140 |
|
} |
141 |
|
|
142 |
|
return $this->visitText($data); |
143 |
|
} |
144 |
|
|
145 |
|
/** |
146 |
|
* {@inheritdoc} |