-
-
Notifications
You must be signed in to change notification settings - Fork 384
CodeCoverage driver for PCOV #661
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
Closed
Closed
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
038a418
CodeCoverage driver for PCOV
krakjoe 69419ef
composer: use all forks
kornrunner b7713fb
travis: fetch github token for composer before install
kornrunner 14e8eed
torturing composer
kornrunner f2ae6b0
composer...
kornrunner d9d9dc3
travis
krakjoe c12b278
...
krakjoe 10cd14b
...
krakjoe 4daa2f4
revert silly stuff
kornrunner 3b9d6ed
.travis update
kornrunner 06428e8
composer: sebastian/environment alias to dev-pcov
kornrunner fa34ed5
Merge branch 'pcov' of github.com:krakjoe/php-code-coverage into pcov
krakjoe 4d6c857
better driver stuff
krakjoe e2158ac
use new function name
krakjoe 3bc31e7
script to install pcov from master for now
krakjoe 08887bc
try without token now
krakjoe 6b4fd44
Revert "try without token now"
krakjoe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?php | ||
/* | ||
* This file is part of the php-code-coverage package. | ||
* | ||
* (c) Sebastian Bergmann <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
namespace SebastianBergmann\CodeCoverage\Driver; | ||
|
||
use SebastianBergmann\CodeCoverage\RuntimeException; | ||
use SebastianBergmann\CodeCoverage\Filter; | ||
|
||
/** | ||
* Driver for PCOV code coverage functionality. | ||
* | ||
* @codeCoverageIgnore | ||
*/ | ||
final class PCOV implements Driver | ||
{ | ||
/** | ||
* @throws RuntimeException | ||
*/ | ||
public function __construct(Filter $filter = null) | ||
{ | ||
|
||
} | ||
|
||
/** | ||
* Start collection of code coverage information. | ||
*/ | ||
public function start(bool $determineUnusedAndDead = true): void | ||
{ | ||
\pcov\start(); | ||
} | ||
|
||
/** | ||
* Stop collection of code coverage information. | ||
*/ | ||
public function stop(): array | ||
{ | ||
\pcov\stop(); | ||
|
||
$waiting = \pcov\waiting(); | ||
$collect = []; | ||
|
||
if ($waiting) { | ||
$collect = \pcov\collect(\pcov\inclusive, $waiting); | ||
|
||
if ($collect) { | ||
\pcov\clear(); | ||
} | ||
} | ||
|
||
return $collect; | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Remove this as it'll only hurt resolution as it pulls everything in dev. It's not necessary if you explicitly require dev-... versions above.