Skip to content

Commit

Permalink
chore[php]: rename booleanArray
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysunxiao committed Jul 11, 2024
1 parent c801f0f commit 6a0fed1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public boolean writeObject(StringBuilder builder, String objectStr, Field field,
builder.append(StringUtils.format("buffer:writeBooleanArray({})", objectStr)).append(LS);
break;
case Php:
builder.append(StringUtils.format("$buffer->writeBooleanArray({});", objectStr)).append(LS);
builder.append(StringUtils.format("$buffer->writeBoolArray({});", objectStr)).append(LS);
break;
case CSharp:
builder.append(StringUtils.format("buffer.WriteBooleanArray({});", objectStr)).append(LS);
Expand All @@ -84,7 +84,7 @@ public boolean writeObject(StringBuilder builder, String objectStr, Field field,
builder.append(StringUtils.format("buffer:writeBooleanArray({})", objectStr)).append(LS);
break;
case Php:
builder.append(StringUtils.format("$buffer->writeBooleanArray({});", objectStr)).append(LS);
builder.append(StringUtils.format("$buffer->writeBoolArray({});", objectStr)).append(LS);
break;
case CSharp:
builder.append(StringUtils.format("buffer.WriteBooleanArray({});", objectStr)).append(LS);
Expand Down Expand Up @@ -514,7 +514,7 @@ public String readObject(StringBuilder builder, Field field, IFieldRegistration
break;
case Php:
array = "$" + array;
builder.append(StringUtils.format("{} = $buffer->readBooleanArray();", array)).append(LS);
builder.append(StringUtils.format("{} = $buffer->readBoolArray();", array)).append(LS);
break;
case CSharp:
builder.append(StringUtils.format("var {} = buffer.ReadBooleanArray();", array)).append(LS);
Expand Down Expand Up @@ -557,7 +557,7 @@ public String readObject(StringBuilder builder, Field field, IFieldRegistration
break;
case Php:
array = "$" + array;
builder.append(StringUtils.format("{} = $buffer->readBooleanArray();", array)).append(LS);
builder.append(StringUtils.format("{} = $buffer->readBoolArray();", array)).append(LS);
break;
case CSharp:
builder.append(StringUtils.format("var {} = buffer.ReadBooleanArray();", array)).append(LS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public boolean writeObject(StringBuilder builder, String objectStr, Field field,
builder.append(StringUtils.format("buffer:writeBooleanArray({})", objectStr)).append(LS);
break;
case Php:
builder.append(StringUtils.format("$buffer->writeBooleanArray({});", objectStr)).append(LS);
builder.append(StringUtils.format("$buffer->writeBoolArray({});", objectStr)).append(LS);
break;
case CSharp:
builder.append(StringUtils.format("buffer.WriteBooleanList({});", objectStr)).append(LS);
Expand Down Expand Up @@ -353,7 +353,7 @@ public String readObject(StringBuilder builder, Field field, IFieldRegistration
break;
case Php:
list = "$" + list;
builder.append(StringUtils.format("{} = buffer->readBooleanArray();", list)).append(LS);
builder.append(StringUtils.format("{} = buffer->readBoolArray();", list)).append(LS);
break;
case CSharp:
builder.append(StringUtils.format("var {} = buffer.ReadBooleanList();", list)).append(LS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public boolean writeObject(StringBuilder builder, String objectStr, Field field,
builder.append(StringUtils.format("buffer:writeBooleanArray({})", objectStr)).append(LS);
break;
case Php:
builder.append(StringUtils.format("$buffer->writeBooleanArray({});", objectStr)).append(LS);
builder.append(StringUtils.format("$buffer->writeBoolArray({});", objectStr)).append(LS);
break;
case CSharp:
builder.append(StringUtils.format("buffer.WriteBooleanSet({});", objectStr)).append(LS);
Expand Down Expand Up @@ -350,7 +350,7 @@ public String readObject(StringBuilder builder, Field field, IFieldRegistration
break;
case Php:
set = "$" + set;
builder.append(StringUtils.format("{} = $buffer->readBooleanArray();", set)).append(LS);
builder.append(StringUtils.format("{} = $buffer->readBoolArray();", set)).append(LS);
break;
case CSharp:
builder.append(StringUtils.format("var {} = buffer.ReadBooleanSet();", set)).append(LS);
Expand Down
4 changes: 2 additions & 2 deletions protocol/src/main/resources/php/ByteBuffer.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ public function readPacket(int $protocolId): mixed
return $protocolRegistration->read($this);
}

public function writeBooleanArray(array $array): void
public function writeBoolArray(array $array): void
{
if (empty($array)) {
$this->writeInt(0);
Expand All @@ -407,7 +407,7 @@ public function writeBooleanArray(array $array): void
}
}

public function readBooleanArray(): array
public function readBoolArray(): array
{
$size = $this->readInt();
$array = array();
Expand Down

0 comments on commit 6a0fed1

Please sign in to comment.