-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
100% test coverage #48
Conversation
public function all(TaxYearId $taxYearId): Generator | ||
{ | ||
return $this->retrieveAll($taxYearId); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ Dead code
@@ -42,7 +42,7 @@ protected static function newFactory(): SharePoolingAssetAcquisitionFactory | |||
return SharePoolingAssetAcquisitionFactory::new(); | |||
} | |||
|
|||
public function averageCostBasisPerUnit(): ?FiatAmount | |||
public function averageCostBasisPerUnit(): FiatAmount |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ Can't actually be null
(wondering why PHPStan didn't pick this up)
/** | ||
* @return Traversable<int, SharePoolingAssetTransaction> | ||
* | ||
* @codeCoverageIgnore | ||
*/ | ||
public function getIterator(): Traversable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ Needs to be implemented because of the IteratorAggregate
interface, but I don't actually use it anywhere
bb75560
to
e17e53f
Compare
e17e53f
to
324d0e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ Dead code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ Dead code
Summary
This PR brings test coverage to 100% of the code base.
Explanation
I previously removed the test coverage constraint because 1) I was in a rush and 2) the report seemed to ignore the
domain
folder.I've since then identified that the reason for the latter was I was using PCOV, which doesn't read
phpunit.xml
properly. Switching to Xdebug for coverage fixes the issue.Checklist