Skip to content

Commit

Permalink
[Change] Protocol packetResponse parameter default value to empty arr…
Browse files Browse the repository at this point in the history
…ay instead of null,

Close #729
  • Loading branch information
bumbummen99 committed Nov 29, 2024
1 parent e773391 commit 1a9b045
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/GameQ/Protocol.php
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,11 @@ public function getPacket($type = [])
/**
* Get/set the packet response
*
* @param array|null $response
* @param array $response
*
* @return array
*/
public function packetResponse(array $response = null)
public function packetResponse(array $response = [])
{

// Act as setter
Expand All @@ -424,7 +424,6 @@ public function packetResponse(array $response = null)
*/
public function hasChallenge()
{

return (isset($this->packets[self::PACKET_CHALLENGE]) && !empty($this->packets[self::PACKET_CHALLENGE]));
}

Expand Down

0 comments on commit 1a9b045

Please sign in to comment.