From bd00dd2e2c00dce7ec583353449a60b9f3723c78 Mon Sep 17 00:00:00 2001 From: Brett McBride Date: Mon, 15 Jan 2024 17:30:41 +1100 Subject: [PATCH] optimize ClassConstantAccessor string concat is about 10x faster than sprintf, so use it here since it's called many times --- src/SDK/Common/Util/ClassConstantAccessor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SDK/Common/Util/ClassConstantAccessor.php b/src/SDK/Common/Util/ClassConstantAccessor.php index 237e70ba5..b4ab1198e 100644 --- a/src/SDK/Common/Util/ClassConstantAccessor.php +++ b/src/SDK/Common/Util/ClassConstantAccessor.php @@ -30,6 +30,6 @@ public static function getValue(string $className, string $constantName) private static function getFullName(string $className, string $constantName): string { - return sprintf('%s::%s', $className, $constantName); + return $className . '::' . $constantName; } }