-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed phpstan error until level 5 #27
Conversation
@@ -532,9 +532,7 @@ protected function prepareTransfers() | |||
} | |||
|
|||
// remove the checksum | |||
$transfer->setRecipientAddress( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removeChecksum
returns a new instance of the address without a checksum.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, you are right. I've fixed it, but I think we should refactor it and don't remove checksum at this point.
@@ -72,7 +72,7 @@ public function setAddresses(array $addresses): self | |||
*/ | |||
public function addAddress(Address $address): self | |||
{ | |||
$this->addresses[] = $address->removeChecksum(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removeChecksum
returns a new instance of the address without a checksum.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See other comment, I prefer to refactor it and put it at an other point of the code.
Thanks for that, see my comments related to the |
@@ -72,7 +75,7 @@ public function setAddresses(array $addresses): self | |||
*/ | |||
public function addAddress(Address $address): self | |||
{ | |||
$this->addresses[] = $address->removeChecksum(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats not correct, if someone calls addAddress with an address including the checksum the checksum is not removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it's removing it twice when you call setAddresses
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me, thanks.
belongs to #26