Skip to content

Commit

Permalink
Merge pull request #2 from onmoon/add-typed-props
Browse files Browse the repository at this point in the history
Added typed properties
  • Loading branch information
sspat authored Mar 5, 2020
2 parents e8ef3eb + ee6cf1d commit 5c57763
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 14 deletions.
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ cache:
- $HOME/.composer/cache

php:
- 7.2
- 7.3
- 7.4
- nightly

Expand Down Expand Up @@ -36,9 +34,9 @@ jobs:
script: ./vendor/bin/security-checker security:check

- stage: Code Style
php: 7.3
php: 7.4
script:
- composer show squizlabs/php_codesniffer
- composer show doctrine/coding-standard
- composer show slevomat/coding-standard
- ./vendor/bin/phpcs
- ./vendor/bin/phpcs
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
],
"require": {
"php": "^7.2",
"php": "^7.4",
"ext-bcmath": "*",
"doctrine/dbal": "^2.10",
"moneyphp/money": "^3.3",
Expand Down
7 changes: 2 additions & 5 deletions src/BaseMoney.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,8 @@ abstract class BaseMoney
{
private const HUMAN_READABLE_NAME = 'Money';

/** @var string */
protected $amount;

/** @var string */
protected $currency;
protected string $amount;
protected string $currency;

final private function __construct(string $amount, string $currency)
{
Expand Down
3 changes: 1 addition & 2 deletions src/Currency.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@

class Currency
{
/** @var string */
private $code;
private string $code;

final private function __construct(string $code)
{
Expand Down
3 changes: 1 addition & 2 deletions src/Money.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@

class Money extends BaseMoney
{
/** @var Currencies|null */
private static $currencies = null;
private static ?Currencies $currencies = null;

protected static function classSubunits() : int
{
Expand Down

0 comments on commit 5c57763

Please sign in to comment.