-
-
Notifications
You must be signed in to change notification settings - Fork 377
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
Encapsulate raw coverage data from drivers #748
Encapsulate raw coverage data from drivers #748
Conversation
Codecov Report
@@ Coverage Diff @@
## master #748 +/- ##
============================================
+ Coverage 83.10% 83.25% +0.15%
- Complexity 834 845 +11
============================================
Files 35 37 +2
Lines 2450 2472 +22
============================================
+ Hits 2036 2058 +22
Misses 414 414
Continue to review full report at Codecov.
|
6208dce
to
b7957eb
Compare
b7957eb
to
46d3c0c
Compare
Thanks! I have made some minor adjustments after merging this. |
👍 |
*/ | ||
private $lineData = []; | ||
|
||
public function __construct(array $rawCoverage = []) |
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.
I do not like the fact that the constructor has to guess the format of the array passed in. Can we please make the constructor private and add separate static methods, named constructors, for each supported format? For instance: fromXdebugWithoutPathCoverage()
, fromXdebugWithPathCoverage()
, etc.
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.
Sure thing
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.
Thanks!
Hi @sebastianbergmann
Please find attached a PR for the first piece of the enabling work for #380. The goal of this particular PR is not to add new functionality, merely to lay groundwork.
What does this PR do?
array
fromDriver->stop()
with a new objectRawCodeCoverageData
, with consequential adjustments to the rest of the codeCodeCoverage
with usage of named methods onRawCodeCoverageData
Please note this PR does not adjust the internal
$this->data
array used by theCodeCoverage
class. I do plan on encapsulating that too, but it will be in a different PR.