diff --git a/src/QUI/ERP/Currency/AbstractCurrency.php b/src/QUI/ERP/Currency/AbstractCurrency.php index 429715aea4c1af15bfd0b003f8355c0cf6bb141a..1bc053c86d3b5520f5ddc286bb80ff4c7c820c8a 100644 --- a/src/QUI/ERP/Currency/AbstractCurrency.php +++ b/src/QUI/ERP/Currency/AbstractCurrency.php @@ -46,7 +46,7 @@ abstract class AbstractCurrency implements CurrencyInterface /** * @var float|bool */ - protected bool|float $exchangeRate = false; + protected bool | float $exchangeRate = false; /** * @var int @@ -182,7 +182,7 @@ public function toArray(): array * @param null|QUI\Locale $Locale -optional * @return float */ - public function amount($amount, null |QUI\Locale $Locale = null): float + public function amount($amount, null | QUI\Locale $Locale = null): float { if (is_float($amount) || is_int($amount)) { return $amount; @@ -215,7 +215,7 @@ public function amount($amount, null |QUI\Locale $Locale = null): float * @param null|QUI\Locale $Locale - optional, locale object * @return string */ - public function format($amount, null|QUI\Locale $Locale = null): string + public function format($amount, null | QUI\Locale $Locale = null): string { if (!$Locale) { $Locale = $this->Locale; @@ -279,7 +279,7 @@ public function autoupdate(): bool * * @throws Exception */ - public function convert($amount, $Currency): float|int|string + public function convert($amount, $Currency): float | int | string { if (!is_numeric($amount)) { QUI\System\Log::addError('Only numeric are allowed Currency->convert()', [ @@ -347,7 +347,7 @@ public function convertFormat($amount, $Currency): string * @param boolean|string|Currency $Currency - optional, default = false -> return own exchange rate * @return float|boolean */ - public function getExchangeRate($Currency = false): float|bool + public function getExchangeRate($Currency = false): float | bool { if ($Currency === false) { return $this->exchangeRate; diff --git a/src/QUI/ERP/Currency/Calc.php b/src/QUI/ERP/Currency/Calc.php index 203012f3023a7e75b92fe2f70f46030b9f7b8407..6123952a25b7190c2bb89f4fa4ea1559508d70a9 100644 --- a/src/QUI/ERP/Currency/Calc.php +++ b/src/QUI/ERP/Currency/Calc.php @@ -26,9 +26,9 @@ class Calc * @throws QUI\Exception */ public static function convert( - float|int|string $amount, - Currency|array|string $currencyFrom, - Currency|array|string $currencyTo = 'EUR' + float | int | string $amount, + Currency | array | string $currencyFrom, + Currency | array | string $currencyTo = 'EUR' ): float { $From = Handler::getCurrency($currencyFrom); $To = Handler::getCurrency($currencyTo); @@ -47,9 +47,9 @@ public static function convert( * @throws QUI\Exception */ public static function convertWithSign( - float|int|string $amount, - Currency|array|string $currencyFrom, - Currency|array|string $currencyTo = 'EUR' + float | int | string $amount, + Currency | array | string $currencyFrom, + Currency | array | string $currencyTo = 'EUR' ): string { $From = Handler::getCurrency($currencyFrom); $To = Handler::getCurrency($currencyTo); @@ -67,9 +67,9 @@ public static function convertWithSign( * @throws QUI\Exception */ public static function getExchangeRateBetween( - Currency|array|string $currencyFrom, - Currency|array|string $currencyTo - ): float|bool { + Currency | array | string $currencyFrom, + Currency | array | string $currencyTo + ): float | bool { $From = Handler::getCurrency($currencyFrom); $To = Handler::getCurrency($currencyTo); diff --git a/src/QUI/ERP/Currency/Conf.php b/src/QUI/ERP/Currency/Conf.php index 1f15810f1e10f50ef9d83e215dc880a682392288..801e3577a6c972f0916f4e0850687f43c4be00e1 100644 --- a/src/QUI/ERP/Currency/Conf.php +++ b/src/QUI/ERP/Currency/Conf.php @@ -52,7 +52,7 @@ public static function getAccountingCurrency(): ?Currency * * @return array|bool|string */ - public static function conf(string $section, ?string $key): bool|array|string + public static function conf(string $section, ?string $key): bool | array | string { try { $Package = QUI::getPackage('quiqqer/currency'); diff --git a/src/QUI/ERP/Currency/Currency.php b/src/QUI/ERP/Currency/Currency.php index 52d55f332149fd54d78c79d188a56a1daf4d1707..a35ac7972654a1fcc08e5f9804d7b33700a1d4b3 100644 --- a/src/QUI/ERP/Currency/Currency.php +++ b/src/QUI/ERP/Currency/Currency.php @@ -23,7 +23,7 @@ class Currency extends AbstractCurrency * @param QUI\Locale|null $Locale * @return string */ - public static function getCurrencyTypeTitle(?QUI\Locale $Locale = null): string + public static function getCurrencyTypeTitle(null | QUI\Locale $Locale = null): string { if (empty($Locale)) { $Locale = QUI::getLocale();