Skip to content

Commit dff07d4

Browse files
ci: fix suggestions by fabbot.io
1 parent 46e9197 commit dff07d4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Symfony/Component/Serializer/Encoder/XmlEncoder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ private function buildXml(\DOMNode $parentNode, mixed $data, string $format, arr
422422
return $this->appendNode($parentNode, $data, $format, $context, 'data');
423423
}
424424

425-
throw new NotEncodableValueException('An unexpected value could not be serialized: '.(!\is_resource($data) ? var_export($data, true) : \sprintf('%s resource', get_resource_type($data))));
425+
throw new NotEncodableValueException('An unexpected value could not be serialized: '.(!\is_resource($data) ? var_export($data, true) : \sprintf('"%s" resource', get_resource_type($data))));
426426
}
427427

428428
/**

src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ public function testDecodeGivenAttributeAlwaysAsCollection()
716716
XML;
717717
$expected = [
718718
'order_row' => [
719-
['id' => 1, 'price' => 1200]
719+
['id' => 1, 'price' => 1200],
720720
],
721721
];
722722

@@ -897,7 +897,7 @@ public function testEncodeXmlWithDateTimeObjectField()
897897
public function testNotEncodableValueExceptionMessageForAResource()
898898
{
899899
$this->expectException(NotEncodableValueException::class);
900-
$this->expectExceptionMessage('An unexpected value could not be serialized: stream resource');
900+
$this->expectExceptionMessage('An unexpected value could not be serialized: "stream" resource');
901901

902902
(new XmlEncoder())->encode(tmpfile(), 'xml');
903903
}

0 commit comments

Comments
 (0)