Skip to content

Commit

Permalink
fix(VAT): Compare using is
Browse files Browse the repository at this point in the history
  • Loading branch information
4513 committed Nov 5, 2023
1 parent dda7632 commit 00fe4b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.0.1] - 2023-11-05

### Fixed
- VAT - Comparing VATs

## [2.0.0] - 2023-10-03

### Added
Expand Down
6 changes: 3 additions & 3 deletions src/VAT.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ public function getDate(): DateTimeInterface
public function is(self $vat, bool $strict = false): bool
{
return $strict
? $this->classification === $vat->getClassification()
&& $this->rate->name === $vat->getRate()->name
? $this->classification->is($vat->getClassification())
&& $this->rate->equals($vat->getRate())
&& $this->countryCode === $vat->getCountryCode()
: $this->classification === $vat->getClassification();
: $this->classification->is($vat->getClassification());
}

/**
Expand Down

0 comments on commit 00fe4b9

Please sign in to comment.