Skip to content

Commit

Permalink
php 8
Browse files Browse the repository at this point in the history
  • Loading branch information
skeeks-semenov committed Apr 11, 2023
1 parent b5f6b4a commit 9c73bc5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Money.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,14 @@ public function convertToCurrency($currencyTo)
* @return mixed data which can be serialized by <b>json_encode</b>,
* @link http://php.net/manual/en/jsonserializable.jsonserialize.php
*/
public function jsonSerialize()
public function jsonSerialize() : mixed
{
return [
'amount' => (float) $this->amount,
'amountFormat' => \Yii::$app->formatter->asDecimal($this->amount),

'amountRound' => (float) round($this->amount, 2),
'amountRoundFormat' => \Yii::$app->formatter->asDecimal((float) round($this->amount, 2)),
'amountRound' => (float) round((float) $this->amount, 2),
'amountRoundFormat' => \Yii::$app->formatter->asDecimal((float) round((float) $this->amount, 2)),

'currency' => $this->currency->code,
'convertSymbol' => $this->currency->symbol,
Expand Down

0 comments on commit 9c73bc5

Please sign in to comment.