Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
66.67% |
2 / 3 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| SimpleXmlToString | |
66.67% |
2 / 3 |
|
0.00% |
0 / 1 |
2.15 | |
0.00% |
0 / 1 |
| convert | |
66.67% |
2 / 3 |
|
0.00% |
0 / 1 |
2.15 | |||
| 1 | <?php |
| 2 | namespace Apie\StorageMetadata\Converters; |
| 3 | |
| 4 | use Apie\TypeConverter\ConverterInterface; |
| 5 | |
| 6 | /** |
| 7 | * @implements ConverterInterface<\SimpleXMLElement|null, ?string> |
| 8 | */ |
| 9 | class SimpleXmlToString implements ConverterInterface |
| 10 | { |
| 11 | public function convert(\SimpleXMLElement|null $input): ?string |
| 12 | { |
| 13 | if ($input === null) { |
| 14 | return null; |
| 15 | } |
| 16 | |
| 17 | return $input->asXML(); |
| 18 | } |
| 19 | } |