From 2f5661ed6d82e75953eb7a3836ef8f153432b11e Mon Sep 17 00:00:00 2001 From: Roland Kovacsics Date: Mon, 10 Jan 2022 13:59:14 +0100 Subject: [PATCH] Fix coding style errors --- src/Types/JsonType.php | 2 +- tests/Types/JsonTest.php | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Types/JsonType.php b/src/Types/JsonType.php index f97b6ca12c1..d28b8b79f0e 100644 --- a/src/Types/JsonType.php +++ b/src/Types/JsonType.php @@ -10,8 +10,8 @@ use function json_encode; use function stream_get_contents; -use const JSON_THROW_ON_ERROR; use const JSON_PRESERVE_ZERO_FRACTION; +use const JSON_THROW_ON_ERROR; /** * Type generating json objects values diff --git a/tests/Types/JsonTest.php b/tests/Types/JsonTest.php index 39521c4c3e0..d1b7f2cd88e 100644 --- a/tests/Types/JsonTest.php +++ b/tests/Types/JsonTest.php @@ -14,6 +14,7 @@ use function fopen; use function json_encode; +use const JSON_PRESERVE_ZERO_FRACTION; use const JSON_THROW_ON_ERROR; class JsonTest extends TestCase @@ -87,7 +88,10 @@ public function testJsonResourceConvertsToPHPValue(): void { $value = ['foo' => 'bar', 'bar' => 'foo']; $databaseValue = fopen( - 'data://text/plain;base64,' . base64_encode(json_encode($value, JSON_THROW_ON_ERROR | JSON_PRESERVE_ZERO_FRACTION)), + 'data://text/plain;base64,' . base64_encode(json_encode( + $value, + JSON_THROW_ON_ERROR | JSON_PRESERVE_ZERO_FRACTION + )), 'r' ); $phpValue = $this->type->convertToPHPValue($databaseValue, $this->platform); @@ -107,7 +111,7 @@ public function testPHPNullValueConvertsToJsonNull(): void public function testPHPValueConvertsToJsonString(): void { - $source = ['foo' => 'bar', 'bar' => 'foo']; + $source = ['foo' => 'bar', 'bar' => 'foo']; $databaseValue = $this->type->convertToDatabaseValue($source, $this->platform); self::assertSame('{"foo":"bar","bar":"foo"}', $databaseValue);