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
Add currency #3
Add currency #3
Conversation
@@ -84,6 +84,11 @@ public function getTime() | |||
return $this->data['us_time']; | |||
} | |||
|
|||
public function getCurrency() | |||
{ | |||
return $this->data['us_currency'] ?? 'RUB'; |
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.
це костиль який то хоча б параметр завети тіпа self::DEFAULT_CURRENCY
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.
І все одно буде костиль, так як воно в двох різних класах.
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.
можна завести трейт з константой і додать його у 2 класа
@@ -48,6 +48,7 @@ public function getData() | |||
'lang' => $this->getLanguage(), | |||
'us_client' => $this->getClient(), | |||
'us_system' => 'freekassa', | |||
'us_currency' => strtoupper($this->getCurrency() ?? 'RUB'), |
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.
ще й тут повторюється
No description provided.