Skip to content

Commit

Permalink
Use strict_types in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Jan 9, 2020
1 parent eddb1f9 commit 091cbe9
Show file tree
Hide file tree
Showing 18 changed files with 38 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/AbstractTestCase.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Brick\Money\Tests;

use Brick\Money\Context;
Expand Down Expand Up @@ -140,11 +142,11 @@ final protected function assertCurrencyEquals(string $currencyCode, int $numeric
}

/**
* @param string $value
* @param mixed $value
*
* @return bool
*/
final protected function isExceptionClass(string $value) : bool
final protected function isExceptionClass($value) : bool
{
return is_string($value) && substr($value, -9) === 'Exception';
}
Expand Down
2 changes: 2 additions & 0 deletions tests/Context/AutoContextTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Brick\Money\Tests\Context;

use Brick\Math\Exception\RoundingNecessaryException;
Expand Down
2 changes: 2 additions & 0 deletions tests/Context/CashContextTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Brick\Money\Tests\Context;

use Brick\Math\Exception\RoundingNecessaryException;
Expand Down
2 changes: 2 additions & 0 deletions tests/Context/CustomContextTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Brick\Money\Tests\Context;

use Brick\Math\Exception\RoundingNecessaryException;
Expand Down
2 changes: 2 additions & 0 deletions tests/Context/DefaultContextTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Brick\Money\Tests\Context;

use Brick\Math\Exception\RoundingNecessaryException;
Expand Down
2 changes: 2 additions & 0 deletions tests/CurrencyConverterTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Brick\Money\Tests;

use Brick\Money\Context;
Expand Down
2 changes: 2 additions & 0 deletions tests/CurrencyTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Brick\Money\Tests;

use Brick\Money\Currency;
Expand Down
2 changes: 2 additions & 0 deletions tests/ExchangeRateProvider/BaseCurrencyProviderTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Brick\Money\Tests\ExchangeRateProvider;

use Brick\Money\ExchangeRateProvider;
Expand Down
2 changes: 2 additions & 0 deletions tests/ExchangeRateProvider/CachedProviderTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Brick\Money\Tests\ExchangeRateProvider;

use Brick\Money\Exception\CurrencyConversionException;
Expand Down
2 changes: 2 additions & 0 deletions tests/ExchangeRateProvider/ConfigurableProviderTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Brick\Money\Tests\ExchangeRateProvider;

use Brick\Money\Exception\CurrencyConversionException;
Expand Down
2 changes: 2 additions & 0 deletions tests/ExchangeRateProvider/PDOProviderTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Brick\Money\Tests\ExchangeRateProvider;

use Brick\Money\Exception\CurrencyConversionException;
Expand Down
2 changes: 2 additions & 0 deletions tests/ExchangeRateProvider/ProviderChainTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Brick\Money\Tests;

use Brick\Money\ExchangeRateProvider;
Expand Down
2 changes: 2 additions & 0 deletions tests/ExchangeRateProvider/ProviderMock.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Brick\Money\Tests\ExchangeRateProvider;

use Brick\Money\Exception\CurrencyConversionException;
Expand Down
2 changes: 2 additions & 0 deletions tests/ISOCurrencyProviderTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Brick\Money\Tests;

use Brick\Money\Currency;
Expand Down
2 changes: 2 additions & 0 deletions tests/MoneyBagTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Brick\Money\Tests;

use Brick\Money\Context\AutoContext;
Expand Down
2 changes: 2 additions & 0 deletions tests/MoneyComparatorTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Brick\Money\Tests;

use Brick\Money\Context\AutoContext;
Expand Down
2 changes: 2 additions & 0 deletions tests/MoneyTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Brick\Money\Tests;

use Brick\Money\Currency;
Expand Down
2 changes: 2 additions & 0 deletions tests/RationalMoneyTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Brick\Money\Tests;

use Brick\Money\Context;
Expand Down

0 comments on commit 091cbe9

Please sign in to comment.