Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Aug 6, 2023
1 parent d4f631d commit 214a73a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 5 additions & 1 deletion Plugin/Directory/Model/Currency.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,15 @@ function aroundFormat(
* @see \Magento\Directory\Model\Currency::formatPrecision()
* https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Directory/Model/Currency.php#L267-L294
* 2023-07-19 Magento 2.4.7-beta1 can pass `null` as $price: @see self::aroundFormat()
* 2023-08-06
* «Dfe\CurrencyFormat\Plugin\Directory\Model\Currency::aroundFormatPrecision():
* Argument #4 ($precision) must be of type int, null given»: https://github.com/mage2pro/currency-format/issues/14
* @param int|null $precision
* @param float|null $price
* @param array(string => string|int) $options [optional]
*/
function aroundFormatPrecision(
Sb $sb, \Closure $f, $price, int $precision, array $options = [], bool $container = true, bool $brackets = false
Sb $sb, \Closure $f, $price, $precision, array $options = [], bool $container = true, bool $brackets = false
):string {
if (Settings::ignorePrecision()) {
$s = Settings::s()->get($sb->getCode()); /** @var O $s */
Expand Down
3 changes: 1 addition & 2 deletions Plugin/Sales/Model/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
use Magento\Sales\Model\Order as Sb;
class Order {
/**
* 2016-08-01
* https://mage2.pro/t/1916
* 2016-08-01 https://mage2.pro/t/1916
* @see \Magento\Sales\Model\Order::formatPrice()
* https://github.com/magento/magento2/blob/2db9e0f1/app/code/Magento/Sales/Model/Order.php#L1566-L1576
*/
Expand Down

0 comments on commit 214a73a

Please sign in to comment.