From 2d9a1a1edaea216b80706bc06b8dde593d74e1ab Mon Sep 17 00:00:00 2001 From: Benjamin Morel Date: Fri, 11 Dec 2020 18:47:10 +0100 Subject: [PATCH] Clean up redundant docblocks --- tests/AbstractTestCase.php | 41 ------ tests/Context/AutoContextTest.php | 8 -- tests/Context/CashContextTest.php | 9 -- tests/Context/CustomContextTest.php | 10 -- tests/Context/DefaultContextTest.php | 8 -- tests/CurrencyConverterTest.php | 23 +-- tests/CurrencyTest.php | 12 -- .../BaseCurrencyProviderTest.php | 132 +++++++++--------- .../ConfigurableProviderTest.php | 6 - .../ExchangeRateProvider/PDOProviderTest.php | 18 --- .../ProviderChainTest.php | 9 -- tests/ExchangeRateProvider/ProviderMock.php | 3 - tests/ISOCurrencyProviderTest.php | 11 -- tests/MoneyComparatorTest.php | 16 +-- tests/MoneyTest.php | 121 ---------------- tests/RationalMoneyTest.php | 42 +----- 16 files changed, 73 insertions(+), 396 deletions(-) diff --git a/tests/AbstractTestCase.php b/tests/AbstractTestCase.php index f77a739..001054e 100644 --- a/tests/AbstractTestCase.php +++ b/tests/AbstractTestCase.php @@ -21,12 +21,6 @@ */ abstract class AbstractTestCase extends TestCase { - /** - * @param string $expected - * @param BigDecimal $actual - * - * @return void - */ final protected function assertBigDecimalIs(string $expected, BigDecimal $actual) : void { self::assertSame($expected, (string) $actual); @@ -36,8 +30,6 @@ final protected function assertBigDecimalIs(string $expected, BigDecimal $actual * @param string $expectedAmount The expected decimal amount. * @param string $expectedCurrency The expected currency code. * @param Money $actual The money to test. - * - * @return void */ final protected function assertMoneyEquals(string $expectedAmount, string $expectedCurrency, Money $actual) : void { @@ -49,8 +41,6 @@ final protected function assertMoneyEquals(string $expectedAmount, string $expec * @param string $expected The expected string representation of the Money. * @param Money $actual The money to test. * @param Context|null $context An optional context to check against the Money. - * - * @return void */ final protected function assertMoneyIs(string $expected, Money $actual, ?Context $context = null) : void { @@ -64,8 +54,6 @@ final protected function assertMoneyIs(string $expected, Money $actual, ?Context /** * @param string[] $expected * @param Money[] $actual - * - * @return void */ final protected function assertMoniesAre(array $expected, array $actual) : void { @@ -77,23 +65,11 @@ final protected function assertMoniesAre(array $expected, array $actual) : void self::assertSame($expected, $actual); } - /** - * @param string $expected - * @param BigNumber $actual - * - * @return void - */ final protected function assertBigNumberEquals(string $expected, BigNumber $actual) : void { self::assertTrue($actual->isEqualTo($expected), $actual . ' != ' . $expected); } - /** - * @param array $expectedAmounts - * @param MoneyBag $moneyBag - * - * @return void - */ final protected function assertMoneyBagContains(array $expectedAmounts, MoneyBag $moneyBag) : void { // Test get() on each currency @@ -113,26 +89,11 @@ final protected function assertMoneyBagContains(array $expectedAmounts, MoneyBag } } - /** - * @param string $expected - * @param RationalMoney $actual - * - * @return void - */ final protected function assertRationalMoneyEquals(string $expected, RationalMoney $actual) : void { self::assertSame($expected, (string) $actual); } - /** - * @param string $currencyCode - * @param int $numericCode - * @param string $name - * @param int $defaultFractionDigits - * @param Currency $currency - * - * @return void - */ final protected function assertCurrencyEquals(string $currencyCode, int $numericCode, string $name, int $defaultFractionDigits, Currency $currency) : void { self::assertSame($currencyCode, $currency->getCurrencyCode()); @@ -143,8 +104,6 @@ final protected function assertCurrencyEquals(string $currencyCode, int $numeric /** * @param mixed $value - * - * @return bool */ final protected function isExceptionClass($value) : bool { diff --git a/tests/Context/AutoContextTest.php b/tests/Context/AutoContextTest.php index 1160c3e..e842746 100644 --- a/tests/Context/AutoContextTest.php +++ b/tests/Context/AutoContextTest.php @@ -20,11 +20,6 @@ class AutoContextTest extends AbstractTestCase { /** * @dataProvider providerApplyTo - * - * @param string $amount - * @param string $currency - * @param int $roundingMode - * @param string $expected */ public function testApplyTo(string $amount, string $currency, int $roundingMode, string $expected) : void { @@ -44,9 +39,6 @@ public function testApplyTo(string $amount, string $currency, int $roundingMode, } } - /** - * @return array - */ public function providerApplyTo() : array { return [ diff --git a/tests/Context/CashContextTest.php b/tests/Context/CashContextTest.php index 9ab7bd5..1f97e49 100644 --- a/tests/Context/CashContextTest.php +++ b/tests/Context/CashContextTest.php @@ -19,12 +19,6 @@ class CashContextTest extends AbstractTestCase { /** * @dataProvider providerApplyTo - * - * @param int $step - * @param string $amount - * @param string $currency - * @param int $roundingMode - * @param string $expected */ public function testApplyTo(int $step, string $amount, string $currency, int $roundingMode, string $expected) : void { @@ -44,9 +38,6 @@ public function testApplyTo(int $step, string $amount, string $currency, int $ro } } - /** - * @return array - */ public function providerApplyTo() : array { return [ diff --git a/tests/Context/CustomContextTest.php b/tests/Context/CustomContextTest.php index 4c633b8..7ee0f23 100644 --- a/tests/Context/CustomContextTest.php +++ b/tests/Context/CustomContextTest.php @@ -19,13 +19,6 @@ class CustomContextTest extends AbstractTestCase { /** * @dataProvider providerApplyTo - * - * @param int $scale - * @param int $step - * @param string $amount - * @param string $currency - * @param int $roundingMode - * @param string $expected */ public function testApplyTo(int $scale, int $step, string $amount, string $currency, int $roundingMode, string $expected) : void { @@ -45,9 +38,6 @@ public function testApplyTo(int $scale, int $step, string $amount, string $curre } } - /** - * @return array - */ public function providerApplyTo() : array { return [ diff --git a/tests/Context/DefaultContextTest.php b/tests/Context/DefaultContextTest.php index 8455cee..5a712c7 100644 --- a/tests/Context/DefaultContextTest.php +++ b/tests/Context/DefaultContextTest.php @@ -19,11 +19,6 @@ class DefaultContextTest extends AbstractTestCase { /** * @dataProvider providerApplyTo - * - * @param string $amount - * @param string $currency - * @param int $roundingMode - * @param string $expected */ public function testApplyTo(string $amount, string $currency, int $roundingMode, string $expected) : void { @@ -43,9 +38,6 @@ public function testApplyTo(string $amount, string $currency, int $roundingMode, } } - /** - * @return array - */ public function providerApplyTo() : array { return [ diff --git a/tests/CurrencyConverterTest.php b/tests/CurrencyConverterTest.php index 3d3b06b..a314d34 100644 --- a/tests/CurrencyConverterTest.php +++ b/tests/CurrencyConverterTest.php @@ -23,9 +23,6 @@ */ class CurrencyConverterTest extends AbstractTestCase { - /** - * @return CurrencyConverter - */ private function createCurrencyConverter() : CurrencyConverter { $exchangeRateProvider = new ConfigurableProvider(); @@ -60,9 +57,6 @@ public function testConvertMoney(array $money, string $toCurrency, int $rounding } } - /** - * @return array - */ public function providerConvertMoney() : array { return [ @@ -84,7 +78,7 @@ public function providerConvertMoney() : array /** * @dataProvider providerConvertMoneyBag * - * @param array $monies The mixed monies to add. + * @param array $monies The mixed currency monies to add. * @param string $currency The target currency code. * @param Context $context The target context. * @param int $roundingMode The rounding mode to use. @@ -107,9 +101,6 @@ public function testConvertMoneyBag(array $monies, string $currency, Context $co $this->assertMoneyIs($total, $currencyConverter->convert($moneyBag, $currency, $roundingMode)); } - /** - * @return array - */ public function providerConvertMoneyBag() : array { return [ @@ -124,9 +115,9 @@ public function providerConvertMoneyBag() : array /** * @dataProvider providerConvertMoneyBagToRational * - * @param array $monies The mixed monies to add. - * @param string $currency The target currency code. - * @param string $expectedTotal The expected total. + * @param array $monies The mixed monies to add. + * @param string $currency The target currency code. + * @param string $expectedTotal The expected total. */ public function testConvertMoneyBagToRational(array $monies, string $currency, string $expectedTotal) : void { @@ -147,9 +138,6 @@ public function testConvertMoneyBagToRational(array $monies, string $currency, s $this->assertRationalMoneyEquals($expectedTotal, $actualTotal); } - /** - * @return array - */ public function providerConvertMoneyBagToRational() : array { return [ @@ -183,9 +171,6 @@ public function testConvertRationalMoney(array $money, string $toCurrency, int $ } } - /** - * @return array - */ public function providerConvertRationalMoney() : array { return [ diff --git a/tests/CurrencyTest.php b/tests/CurrencyTest.php index 0ab337e..807fe7f 100644 --- a/tests/CurrencyTest.php +++ b/tests/CurrencyTest.php @@ -29,9 +29,6 @@ public function testOf(string $currencyCode, int $numericCode, int $fractionDigi $this->assertCurrencyEquals($currencyCode, $numericCode, $name, $fractionDigits, $currency); } - /** - * @return array - */ public function providerOf() : array { return [ @@ -54,9 +51,6 @@ public function testOfUnknownCurrencyCode($currencyCode) : void Currency::of($currencyCode); } - /** - * @return array - */ public function providerOfUnknownCurrencyCode() : array { return [ @@ -78,9 +72,6 @@ public function testOfReturnsSameInstance() : void /** * @dataProvider providerOfCountry - * - * @param string $countryCode - * @param string $expected */ public function testOfCountry(string $countryCode, string $expected) : void { @@ -96,9 +87,6 @@ public function testOfCountry(string $countryCode, string $expected) : void } } - /** - * @return array - */ public function providerOfCountry() : array { return [ diff --git a/tests/ExchangeRateProvider/BaseCurrencyProviderTest.php b/tests/ExchangeRateProvider/BaseCurrencyProviderTest.php index ca3b390..0b27167 100644 --- a/tests/ExchangeRateProvider/BaseCurrencyProviderTest.php +++ b/tests/ExchangeRateProvider/BaseCurrencyProviderTest.php @@ -1,69 +1,63 @@ -setExchangeRate('USD', 'EUR', 0.9); - $provider->setExchangeRate('USD', 'GBP', 0.8); - $provider->setExchangeRate('USD', 'CAD', 1.1); - - return new BaseCurrencyProvider($provider, 'USD'); - } - - /** - * @dataProvider providerGetExchangeRate - * - * @param string $sourceCurrencyCode The code of the source currency. - * @param string $targetCurrencyCode The code of the target currency. - * @param string $exchangeRate The expected exchange rate, rounded DOWN to 6 decimals. - */ - public function testGetExchangeRate(string $sourceCurrencyCode, string $targetCurrencyCode, string $exchangeRate) : void - { - $rate = $this->getExchangeRateProvider()->getExchangeRate($sourceCurrencyCode, $targetCurrencyCode); - self::assertSame($exchangeRate, (string) BigRational::of($rate)->toScale(6, RoundingMode::DOWN)); - } - - /** - * @return array - */ - public function providerGetExchangeRate() : array - { - return [ - ['USD', 'EUR', '0.900000'], - ['USD', 'GBP', '0.800000'], - ['USD', 'CAD', '1.100000'], - - ['EUR', 'USD', '1.111111'], - ['GBP', 'USD', '1.250000'], - ['CAD', 'USD', '0.909090'], - - ['EUR', 'GBP', '0.888888'], - ['EUR', 'CAD', '1.222222'], - ['GBP', 'EUR', '1.125000'], - ['GBP', 'CAD', '1.375000'], - ['CAD', 'EUR', '0.818181'], - ['CAD', 'GBP', '0.727272'], - ]; - } -} +setExchangeRate('USD', 'EUR', 0.9); + $provider->setExchangeRate('USD', 'GBP', 0.8); + $provider->setExchangeRate('USD', 'CAD', 1.1); + + return new BaseCurrencyProvider($provider, 'USD'); + } + + /** + * @dataProvider providerGetExchangeRate + * + * @param string $sourceCurrencyCode The code of the source currency. + * @param string $targetCurrencyCode The code of the target currency. + * @param string $exchangeRate The expected exchange rate, rounded DOWN to 6 decimals. + */ + public function testGetExchangeRate(string $sourceCurrencyCode, string $targetCurrencyCode, string $exchangeRate) : void + { + $rate = $this->getExchangeRateProvider()->getExchangeRate($sourceCurrencyCode, $targetCurrencyCode); + self::assertSame($exchangeRate, (string) BigRational::of($rate)->toScale(6, RoundingMode::DOWN)); + } + + public function providerGetExchangeRate() : array + { + return [ + ['USD', 'EUR', '0.900000'], + ['USD', 'GBP', '0.800000'], + ['USD', 'CAD', '1.100000'], + + ['EUR', 'USD', '1.111111'], + ['GBP', 'USD', '1.250000'], + ['CAD', 'USD', '0.909090'], + + ['EUR', 'GBP', '0.888888'], + ['EUR', 'CAD', '1.222222'], + ['GBP', 'EUR', '1.125000'], + ['GBP', 'CAD', '1.375000'], + ['CAD', 'EUR', '0.818181'], + ['CAD', 'GBP', '0.727272'], + ]; + } +} diff --git a/tests/ExchangeRateProvider/ConfigurableProviderTest.php b/tests/ExchangeRateProvider/ConfigurableProviderTest.php index 35d5486..ca905fe 100644 --- a/tests/ExchangeRateProvider/ConfigurableProviderTest.php +++ b/tests/ExchangeRateProvider/ConfigurableProviderTest.php @@ -17,9 +17,6 @@ */ class ConfigurableProviderTest extends AbstractTestCase { - /** - * @return ExchangeRateProvider - */ private function getExchangeRateProvider() : ExchangeRateProvider { $provider = new ConfigurableProvider(); @@ -44,9 +41,6 @@ public function testGetExchangeRate(string $sourceCurrencyCode, string $targetCu self::assertSame($exchangeRate, (string) BigRational::of($rate)->toScale(3, RoundingMode::DOWN)); } - /** - * @return array - */ public function providerGetExchangeRate() : array { return [ diff --git a/tests/ExchangeRateProvider/PDOProviderTest.php b/tests/ExchangeRateProvider/PDOProviderTest.php index 2de1305..a733e6c 100644 --- a/tests/ExchangeRateProvider/PDOProviderTest.php +++ b/tests/ExchangeRateProvider/PDOProviderTest.php @@ -18,9 +18,6 @@ class PDOProviderTest extends AbstractTestCase { /** * @dataProvider providerConstructorWithInvalidConfiguration - * - * @param PDOProviderConfiguration $configuration - * @param string $exceptionMessage */ public function testConstructorWithInvalidConfiguration(PDOProviderConfiguration $configuration, string $exceptionMessage) : void { @@ -32,9 +29,6 @@ public function testConstructorWithInvalidConfiguration(PDOProviderConfiguration new PDOProvider($pdo, $configuration); } - /** - * @return array - */ public function providerConstructorWithInvalidConfiguration() : array { $noTableName = new PDOProviderConfiguration(); @@ -105,9 +99,6 @@ public function testGetExchangeRate(string $sourceCurrencyCode, string $targetCu } } - /** - * @return array - */ public function providerGetExchangeRate() : array { return [ @@ -162,9 +153,6 @@ public function testWithFixedSourceCurrency(string $sourceCurrencyCode, string $ } } - /** - * @return array - */ public function providerWithFixedSourceCurrency() : array { return [ @@ -219,9 +207,6 @@ public function testWithFixedTargetCurrency(string $sourceCurrencyCode, string $ } } - /** - * @return array - */ public function providerWithFixedTargetCurrency() : array { return [ @@ -284,9 +269,6 @@ public function testWithParameters(string $sourceCurrencyCode, string $targetCur } } - /** - * @return array - */ public function providerWithParameters() : array { return [ diff --git a/tests/ExchangeRateProvider/ProviderChainTest.php b/tests/ExchangeRateProvider/ProviderChainTest.php index 3a22d27..62c01d9 100644 --- a/tests/ExchangeRateProvider/ProviderChainTest.php +++ b/tests/ExchangeRateProvider/ProviderChainTest.php @@ -48,9 +48,6 @@ public function testUnknownExchangeRate() : void $providerChain->getExchangeRate('USD', 'GBP'); } - /** - * @return ProviderChain - */ public function testAddFirstProvider() : ProviderChain { $provider = new ProviderChain(); @@ -64,10 +61,6 @@ public function testAddFirstProvider() : ProviderChain /** * @depends testAddFirstProvider - * - * @param ProviderChain $provider - * - * @return ProviderChain */ public function testAddSecondProvider(ProviderChain $provider) : ProviderChain { @@ -82,8 +75,6 @@ public function testAddSecondProvider(ProviderChain $provider) : ProviderChain /** * @depends testAddSecondProvider - * - * @param ProviderChain $provider */ public function testRemoveProvider(ProviderChain $provider) : void { diff --git a/tests/ExchangeRateProvider/ProviderMock.php b/tests/ExchangeRateProvider/ProviderMock.php index e1f9cb1..0d92fa7 100644 --- a/tests/ExchangeRateProvider/ProviderMock.php +++ b/tests/ExchangeRateProvider/ProviderMock.php @@ -29,9 +29,6 @@ class ProviderMock implements ExchangeRateProvider */ private $calls = 0; - /** - * @return int - */ public function getCalls() : int { return $this->calls; diff --git a/tests/ISOCurrencyProviderTest.php b/tests/ISOCurrencyProviderTest.php index 0c29056..7d3dc41 100644 --- a/tests/ISOCurrencyProviderTest.php +++ b/tests/ISOCurrencyProviderTest.php @@ -29,11 +29,6 @@ public static function setUpBeforeClass() : void /** * @dataProvider providerGetCurrency - * - * @param string $currencyCode - * @param int $numericCode - * @param string $name - * @param int $defaultFractionDigits */ public function testGetCurrency(string $currencyCode, int $numericCode, string $name, int $defaultFractionDigits) : void { @@ -46,9 +41,6 @@ public function testGetCurrency(string $currencyCode, int $numericCode, string $ $this->assertCurrencyEquals($currencyCode, $numericCode, $name, $defaultFractionDigits, $currency); } - /** - * @return array - */ public function providerGetCurrency() : array { return [ @@ -76,9 +68,6 @@ public function testGetUnknownCurrency($currencyCode) : void ISOCurrencyProvider::getInstance()->getCurrency($currencyCode); } - /** - * @return array - */ public function providerUnknownCurrency() : array { return [ diff --git a/tests/MoneyComparatorTest.php b/tests/MoneyComparatorTest.php index 0a5e69f..44c9071 100644 --- a/tests/MoneyComparatorTest.php +++ b/tests/MoneyComparatorTest.php @@ -15,9 +15,6 @@ */ class MoneyComparatorTest extends AbstractTestCase { - /** - * @return ConfigurableProvider - */ private function getExchangeRateProvider() : ConfigurableProvider { $provider = new ConfigurableProvider(); @@ -37,8 +34,8 @@ private function getExchangeRateProvider() : ConfigurableProvider /** * @dataProvider providerCompare * - * @param array $a The money to compare. - * @param array $b The money to compare to. + * @param array $a The money to compare. + * @param array $b The money to compare to. * @param int|string $cmp The expected comparison value, or an exception class. */ public function testCompare(array $a, array $b, $cmp) : void @@ -60,9 +57,6 @@ public function testCompare(array $a, array $b, $cmp) : void self::assertSame($cmp === 0, $comparator->isEqual($a, $b)); } - /** - * @return array - */ public function providerCompare() : array { return [ @@ -116,9 +110,6 @@ public function testMin(array $monies, string $expectedMin) : void } } - /** - * @return array - */ public function providerMin() : array { return [ @@ -156,9 +147,6 @@ public function testMax(array $monies, string $expectedMin) : void } } - /** - * @return array - */ public function providerMax() : array { return [ diff --git a/tests/MoneyTest.php b/tests/MoneyTest.php index a3a98ad..9a48752 100644 --- a/tests/MoneyTest.php +++ b/tests/MoneyTest.php @@ -45,9 +45,6 @@ public function testOf($expectedResult, ...$args) : void } } - /** - * @return array - */ public function providerOf() : array { return [ @@ -84,9 +81,6 @@ public function testOfMinor($expectedResult, ...$args) : void } } - /** - * @return array - */ public function providerOfMinor() : array { return [ @@ -101,10 +95,6 @@ public function providerOfMinor() : array /** * @dataProvider providerZero - * - * @param string $currency - * @param Context|null $context - * @param string $expected */ public function testZero(string $currency, ?Context $context, string $expected) : void { @@ -112,9 +102,6 @@ public function testZero(string $currency, ?Context $context, string $expected) $this->assertMoneyIs($expected, $actual, $context === null ? new DefaultContext() : $context); } - /** - * @return array - */ public function providerZero() : array { return [ @@ -128,11 +115,6 @@ public function providerZero() : array /** * @dataProvider providerTo - * - * @param array $money - * @param Context $context - * @param int $roundingMode - * @param string $expected */ public function testTo(array $money, Context $context, int $roundingMode, string $expected) : void { @@ -149,9 +131,6 @@ public function testTo(array $money, Context $context, int $roundingMode, string } } - /** - * @return array - */ public function providerTo() : array { return [ @@ -195,9 +174,6 @@ public function testPlus(array $money, $plus, int $roundingMode, string $expecte } } - /** - * @return array - */ public function providerPlus() : array { return [ @@ -256,9 +232,6 @@ public function testMinus(array $money, $minus, int $roundingMode, string $expec } } - /** - * @return array - */ public function providerMinus() : array { return [ @@ -299,9 +272,6 @@ public function testMultipliedBy(array $money, $multiplier, int $roundingMode, s } } - /** - * @return array - */ public function providerMultipliedBy() : array { return [ @@ -341,9 +311,6 @@ public function testDividedBy(array $money, $divisor, int $roundingMode, string } } - /** - * @return array - */ public function providerDividedBy() : array { return [ @@ -364,11 +331,6 @@ public function providerDividedBy() : array /** * @dataProvider providerQuotientAndRemainder - * - * @param array $money - * @param int $divisor - * @param string $expectedQuotient - * @param string $expectedRemainder */ public function testQuotientAndRemainder(array $money, int $divisor, string $expectedQuotient, string $expectedRemainder) : void { @@ -379,9 +341,6 @@ public function testQuotientAndRemainder(array $money, int $divisor, string $exp $this->assertMoneyIs($expectedRemainder, $remainder); } - /** - * @return array - */ public function providerQuotientAndRemainder() : array { return [ @@ -402,10 +361,6 @@ public function testQuotientAndRemainderThrowExceptionOnDecimal() : void /** * @dataProvider providerAllocate - * - * @param array $money - * @param array $ratios - * @param array $expected */ public function testAllocate(array $money, array $ratios, array $expected) : void { @@ -414,9 +369,6 @@ public function testAllocate(array $money, array $ratios, array $expected) : voi $this->assertMoniesAre($expected, $monies); } - /** - * @return array - */ public function providerAllocate() : array { return [ @@ -464,10 +416,6 @@ public function testAllocateZeroRatios() : void /** * @dataProvider providerSplit - * - * @param array $money - * @param int $targets - * @param array $expected */ public function testSplit(array $money, int $targets, array $expected) : void { @@ -476,9 +424,6 @@ public function testSplit(array $money, int $targets, array $expected) : void $this->assertMoniesAre($expected, $monies); } - /** - * @return array - */ public function providerSplit() : array { return [ @@ -495,8 +440,6 @@ public function providerSplit() : array /** * @dataProvider providerSplitIntoLessThanOnePart - * - * @param int $parts */ public function testSplitIntoLessThanOnePart(int $parts) : void { @@ -508,9 +451,6 @@ public function testSplitIntoLessThanOnePart(int $parts) : void $money->split($parts); } - /** - * @return array - */ public function providerSplitIntoLessThanOnePart() : array { return [ @@ -521,18 +461,12 @@ public function providerSplitIntoLessThanOnePart() : array /** * @dataProvider providerAbs - * - * @param array $money - * @param string $abs */ public function testAbs(array $money, string $abs) : void { $this->assertMoneyIs($abs, Money::of(...$money)->abs()); } - /** - * @return array - */ public function providerAbs() : array { return [ @@ -544,18 +478,12 @@ public function providerAbs() : array /** * @dataProvider providerNegated - * - * @param array $money - * @param string $negated */ public function testNegated(array $money, string $negated) : void { $this->assertMoneyIs($negated, Money::of(...$money)->negated()); } - /** - * @return array - */ public function providerNegated() : array { return [ @@ -566,9 +494,6 @@ public function providerNegated() : array /** * @dataProvider providerSign - * - * @param array $money - * @param int $sign */ public function testGetSign(array $money, int $sign) : void { @@ -577,9 +502,6 @@ public function testGetSign(array $money, int $sign) : void /** * @dataProvider providerSign - * - * @param array $money - * @param int $sign */ public function testIsZero(array $money, int $sign) : void { @@ -588,9 +510,6 @@ public function testIsZero(array $money, int $sign) : void /** * @dataProvider providerSign - * - * @param array $money - * @param int $sign */ public function testIsPositive(array $money, int $sign) : void { @@ -599,9 +518,6 @@ public function testIsPositive(array $money, int $sign) : void /** * @dataProvider providerSign - * - * @param array $money - * @param int $sign */ public function testIsPositiveOrZero(array $money, int $sign) : void { @@ -610,9 +526,6 @@ public function testIsPositiveOrZero(array $money, int $sign) : void /** * @dataProvider providerSign - * - * @param array $money - * @param int $sign */ public function testIsNegative(array $money, int $sign) : void { @@ -621,18 +534,12 @@ public function testIsNegative(array $money, int $sign) : void /** * @dataProvider providerSign - * - * @param array $money - * @param int $sign */ public function testIsNegativeOrZero(array $money, int $sign) : void { self::assertSame($sign <= 0, Money::of(...$money)->isNegativeOrZero()); } - /** - * @return array - */ public function providerSign() : array { return [ @@ -780,9 +687,6 @@ public function providerIsAmountAndCurrencyEqualTo() : \Generator yield [[1, 'EUR'], [1, 'USD'], false]; } - /** - * @return array - */ public function providerCompare() : array { return [ @@ -799,9 +703,6 @@ public function providerCompare() : array /** * @dataProvider providerGetMinorAmount - * - * @param array $money - * @param string $expected */ public function testGetMinorAmount(array $money, string $expected) : void { @@ -811,9 +712,6 @@ public function testGetMinorAmount(array $money, string $expected) : void self::assertSame($expected, (string) $actual); } - /** - * @return array - */ public function providerGetMinorAmount() : array { return [ @@ -835,10 +733,6 @@ public function testGetUnscaledAmount() : void /** * @dataProvider providerConvertedTo - * - * @param array $money - * @param array $parameters - * @param string $expected */ public function testConvertedTo(array $money, array $parameters, string $expected) : void { @@ -846,9 +740,6 @@ public function testConvertedTo(array $money, array $parameters, string $expecte $this->assertMoneyIs($expected, $actual); } - /** - * @return array - */ public function providerConvertedTo() : array { return [ @@ -875,9 +766,6 @@ public function testFormatWith(array $money, string $locale, string $symbol, str self::assertSame($expected, $actual); } - /** - * @return array - */ public function providerFormatWith() : array { return [ @@ -899,9 +787,6 @@ public function testFormatTo(array $money, string $locale, bool $allowWholeNumbe self::assertSame($expected, Money::of(...$money)->formatTo($locale, $allowWholeNumber)); } - /** - * @return array - */ public function providerFormatTo() : array { return [ @@ -949,9 +834,6 @@ public function testMin(array $monies, string $expectedResult) : void } } - /** - * @return array - */ public function providerMin() : array { return [ @@ -985,9 +867,6 @@ public function testMax(array $monies, string $expectedResult) : void } } - /** - * @return array - */ public function providerMax() : array { return [ diff --git a/tests/RationalMoneyTest.php b/tests/RationalMoneyTest.php index b671554..2578aa2 100644 --- a/tests/RationalMoneyTest.php +++ b/tests/RationalMoneyTest.php @@ -37,9 +37,7 @@ public function testGetters() : void /** * @dataProvider providerPlus * - * @param array $rationalMoney - * @param mixed $amount - * @param string $expected + * @param mixed $amount */ public function testPlus(array $rationalMoney, $amount, string $expected) : void { @@ -56,9 +54,6 @@ public function testPlus(array $rationalMoney, $amount, string $expected) : void } } - /** - * @return array - */ public function providerPlus() : array { return [ @@ -75,9 +70,7 @@ public function providerPlus() : array /** * @dataProvider providerMinus * - * @param array $rationalMoney - * @param mixed $amount - * @param string $expected + * @param mixed $amount */ public function testMinus(array $rationalMoney, $amount, string $expected) : void { @@ -94,9 +87,6 @@ public function testMinus(array $rationalMoney, $amount, string $expected) : voi } } - /** - * @return array - */ public function providerMinus() : array { return [ @@ -113,9 +103,7 @@ public function providerMinus() : array /** * @dataProvider providerMultipliedBy * - * @param array $rationalMoney - * @param mixed $operand - * @param string $expected + * @param mixed $operand */ public function testMultipliedBy(array $rationalMoney, $operand, string $expected) : void { @@ -132,9 +120,6 @@ public function testMultipliedBy(array $rationalMoney, $operand, string $expecte } } - /** - * @return array - */ public function providerMultipliedBy() : array { return [ @@ -147,9 +132,7 @@ public function providerMultipliedBy() : array /** * @dataProvider providerDividedBy * - * @param array $rationalMoney - * @param mixed $operand - * @param string $expected + * @param mixed $operand */ public function testDividedBy(array $rationalMoney, $operand, string $expected) : void { @@ -166,9 +149,6 @@ public function testDividedBy(array $rationalMoney, $operand, string $expected) } } - /** - * @return array - */ public function providerDividedBy() : array { return [ @@ -181,9 +161,6 @@ public function providerDividedBy() : array /** * @dataProvider providerSimplified - * - * @param array $rationalMoney - * @param string $expected */ public function testSimplified(array $rationalMoney, string $expected) : void { @@ -193,9 +170,6 @@ public function testSimplified(array $rationalMoney, string $expected) : void $this->assertRationalMoneyEquals($expected, $actual); } - /** - * @return array - */ public function providerSimplified() : array { return [ @@ -208,11 +182,6 @@ public function providerSimplified() : array /** * @dataProvider providerTo - * - * @param array $rationalMoney - * @param Context $context - * @param int $roundingMode - * @param string $expected */ public function testTo(array $rationalMoney, Context $context, int $roundingMode, string $expected) : void { @@ -229,9 +198,6 @@ public function testTo(array $rationalMoney, Context $context, int $roundingMode } } - /** - * @return array - */ public function providerTo() : array { return [