Refactor getSelf method to instantiate Peer directly from sendRequest response
This commit is contained in:
parent
a7da38d5f9
commit
3935980146
1 changed files with 2 additions and 2 deletions
|
@ -398,9 +398,9 @@
|
|||
*/
|
||||
public function getSelf(): Peer
|
||||
{
|
||||
return $this->sendRequest(
|
||||
return new Peer($this->sendRequest(
|
||||
new RpcRequest(StandardMethods::GET_SELF)
|
||||
)->getResponse()->getResult();
|
||||
)->getResponse()->getResult());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue