Skip to content

Commit 29dca49

Browse files
committed
hide debug info OperationSerializer
1 parent f3eacd8 commit 29dca49

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Tools/ChainOperations/OperationSerializer.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,11 @@ public static function serializeType($type, $value, $byteBuffer)
100100
if ($type === self::TYPE_STRING) {
101101
//Writes a UTF8 encoded string prefixed 32bit base 128 variable-length integer.
102102
$strLength = strlen($value);
103-
echo PHP_EOL . ' $value ' . $value;
104-
echo PHP_EOL . ' $strLength ' . $strLength;
103+
105104
if ($strLength < 128) {
106105
$byteBuffer->writeInt8($strLength);
107106
} else {
108-
echo PHP_EOL . ' prefix ' . round($strLength / 128, 0);
109-
echo PHP_EOL . ' number ' . ($strLength - round($strLength / 128, 0) * 128);
107+
110108
$strLength = ceil($strLength / 128) * 256
111109
+ ($strLength - ceil($strLength / 128) * 128);
112110
$byteBuffer->writeInt16LE($strLength);

0 commit comments

Comments
 (0)