From 00d51eb54a4a6e004fe971796e97ccb309fa9bee Mon Sep 17 00:00:00 2001 From: Christopher Georg Date: Sat, 24 Feb 2024 21:06:30 +0100 Subject: [PATCH] chore: small improvements --- src/Money/MoneyManager.php | 7 +------ src/Money/MoneyManagerInterface.php | 3 --- src/MoneyException.php | 2 -- src/Pair/PairManager.php | 2 -- src/PairHistory/PairHistoryManagerInterface.php | 3 --- src/TbbcMoneyBundle.php | 3 --- src/TbbcMoneyEvents.php | 3 --- src/Twig/Extension/CurrencyExtension.php | 3 +++ 8 files changed, 4 insertions(+), 22 deletions(-) diff --git a/src/Money/MoneyManager.php b/src/Money/MoneyManager.php index 2eff9fa9..7a6d4f78 100644 --- a/src/Money/MoneyManager.php +++ b/src/Money/MoneyManager.php @@ -8,15 +8,10 @@ use Money\Money; /** - * Class MoneyManager. - * * @author levan */ class MoneyManager implements MoneyManagerInterface { - /** - * MoneyManager constructor. - */ public function __construct(protected string $referenceCurrencyCode, protected int $decimals = 2) { } @@ -32,7 +27,7 @@ public function createMoneyFromFloat(float $floatAmount, ?string $currencyCode = $currency = new Currency($currencyCode); $amountAsInt = $floatAmount * 10 ** $this->decimals; $amountAsInt = round($amountAsInt); - $amountAsInt = intval($amountAsInt); + $amountAsInt = (int)$amountAsInt; return new Money($amountAsInt, $currency); } diff --git a/src/Money/MoneyManagerInterface.php b/src/Money/MoneyManagerInterface.php index 75e579d4..b3b057ef 100644 --- a/src/Money/MoneyManagerInterface.php +++ b/src/Money/MoneyManagerInterface.php @@ -6,9 +6,6 @@ use Money\Money; -/** - * Interface MoneyManagerInterface. - */ interface MoneyManagerInterface { /** diff --git a/src/MoneyException.php b/src/MoneyException.php index 48b8ea98..1eb0f350 100644 --- a/src/MoneyException.php +++ b/src/MoneyException.php @@ -5,8 +5,6 @@ namespace Tbbc\MoneyBundle; /** - * Class MoneyException. - * * @author Philippe Le Van. */ class MoneyException extends \Exception diff --git a/src/Pair/PairManager.php b/src/Pair/PairManager.php index ea675f03..ce4fe89a 100644 --- a/src/Pair/PairManager.php +++ b/src/Pair/PairManager.php @@ -17,8 +17,6 @@ use Tbbc\MoneyBundle\TbbcMoneyEvents; /** - * Class PairManager. - * * @author Philippe Le Van. */ class PairManager implements PairManagerInterface, Exchange diff --git a/src/PairHistory/PairHistoryManagerInterface.php b/src/PairHistory/PairHistoryManagerInterface.php index e162a200..6528f06b 100644 --- a/src/PairHistory/PairHistoryManagerInterface.php +++ b/src/PairHistory/PairHistoryManagerInterface.php @@ -6,9 +6,6 @@ use Tbbc\MoneyBundle\Pair\SaveRatioEvent; -/** - * Interface PairHistoryManagerInterface. - */ interface PairHistoryManagerInterface { /** diff --git a/src/TbbcMoneyBundle.php b/src/TbbcMoneyBundle.php index 1643a017..65868e4f 100644 --- a/src/TbbcMoneyBundle.php +++ b/src/TbbcMoneyBundle.php @@ -10,9 +10,6 @@ use Tbbc\MoneyBundle\DependencyInjection\Compiler\RatioProviderCompilerPass; use Tbbc\MoneyBundle\DependencyInjection\Compiler\StorageCompilerPass; -/** - * Class TbbcMoneyBundle. - */ class TbbcMoneyBundle extends Bundle { public function build(ContainerBuilder $container): void diff --git a/src/TbbcMoneyEvents.php b/src/TbbcMoneyEvents.php index 3bafeb79..7143b21b 100644 --- a/src/TbbcMoneyEvents.php +++ b/src/TbbcMoneyEvents.php @@ -4,9 +4,6 @@ namespace Tbbc\MoneyBundle; -/** - * Class TbbcMoneyEvents. - */ class TbbcMoneyEvents { public const AFTER_RATIO_SAVE = 'tbbc_money.after_ratio_save'; diff --git a/src/Twig/Extension/CurrencyExtension.php b/src/Twig/Extension/CurrencyExtension.php index 80a66d0d..83655460 100644 --- a/src/Twig/Extension/CurrencyExtension.php +++ b/src/Twig/Extension/CurrencyExtension.php @@ -22,6 +22,9 @@ public function __construct(protected MoneyFormatter $moneyFormatter) { } + /** + * {@inheritDoc} + */ public function getFilters(): array { return [