Skip to content

Commit 7d75619

Browse files
committed
Rename Json::jsonEncode to Json::encode
1 parent ce605ab commit 7d75619

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Json.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public static function decode(string $jsonString, int $depth = 512)
4242
*
4343
* @throws JsonException
4444
*/
45-
public static function jsonEncode($data): string
45+
public static function encode($data): string
4646
{
4747
return json_encode($data, JSON_THROW_ON_ERROR);
4848
}

src/Requests.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ public static function prepareJsonSchemaForTransfer(string $schema): string
4747
$decoded = Json::decode($schema);
4848

4949
if (is_array($decoded) && array_key_exists('schema', $decoded)) {
50-
return Json::jsonEncode($decoded);
50+
return Json::encode($decoded);
5151
}
5252

53-
return Json::jsonEncode(['schema' => Json::jsonEncode($decoded)]);
53+
return Json::encode(['schema' => Json::encode($decoded)]);
5454
}
5555

5656
public static function registerNewSchemaVersionWithSubjectRequest(string $schema, string $subjectName): RequestInterface
@@ -123,7 +123,7 @@ public static function validateCompatibilityLevel(string $compatibilityVersion):
123123

124124
public static function prepareCompatibilityLevelForTransport(string $compatibilityLevel): string
125125
{
126-
return Json::jsonEncode(['compatibility' => $compatibilityLevel]);
126+
return Json::encode(['compatibility' => $compatibilityLevel]);
127127
}
128128

129129
public static function changeDefaultCompatibilityLevelRequest(string $level): RequestInterface

0 commit comments

Comments
 (0)