Skip to content

Commit

Permalink
Refactored ClientStorageInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
programarivm committed Aug 21, 2024
1 parent 72b8df5 commit af030aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Socket/ClientStorageInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ public function getLogger(): Logger;

public function detachById(int $id): void;

public function sendToOne(int $id, $data): void;
public function sendToOne(int $id, $res): void;

public function sendToMany(array $ids, $data): void;
public function sendToMany(array $ids, $res): void;

public function sendToAll($data): void;
public function sendToAll($res): void;
}
6 changes: 3 additions & 3 deletions src/Socket/Workerman/TextClientStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function detachById(int $id): void
}
}

public function sendToOne(int $id, array $res): void
public function sendToOne(int $id, $res): void
{
$this->rewind();
while ($this->valid()) {
Expand All @@ -45,7 +45,7 @@ public function sendToOne(int $id, array $res): void
}
}

public function sendToMany(array $ids, array $res): void
public function sendToMany(array $ids, $res): void
{
$json = json_encode($res);
$this->rewind();
Expand All @@ -61,7 +61,7 @@ public function sendToMany(array $ids, array $res): void
}
}

public function sendToAll(array $res): void
public function sendToAll($res): void
{
$json = json_encode($res);
$this->rewind();
Expand Down

0 comments on commit af030aa

Please sign in to comment.