Skip to content

Commit

Permalink
Fix psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
mustanggb authored Feb 25, 2024
1 parent 88e60eb commit b957c6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Type/MoneyType.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?Mo
return null;
}

return new Money((int) $amount, new Currency($currency));
return new Money((int) $money[1], new Currency($money[0]));

Check failure on line 47 in src/Type/MoneyType.php

View workflow job for this annotation

GitHub Actions / psalm

PossiblyUndefinedArrayOffset

src/Type/MoneyType.php:47:32: PossiblyUndefinedArrayOffset: Possibly undefined array key $money[1] on list{0: non-empty-string, 1?: non-empty-string} (see https://psalm.dev/167)
}

public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): ?string
Expand Down

0 comments on commit b957c6e

Please sign in to comment.