-
-
Notifications
You must be signed in to change notification settings - Fork 385
Represent line-coverage data in objects #1109
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1a5010f
Represent line-coverage data in objects
staabm 3f821e2
Reworked ProcessedClassType, ProcessedTraitType
staabm 51d5f83
turn properties readonly
staabm d222c6d
new classes are internal
staabm 0d16db2
use traditional properties
staabm acb2ed4
fix bad merge
staabm 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| <?php declare(strict_types=1); | ||
| /* | ||
| * This file is part of phpunit/php-code-coverage. | ||
| * | ||
| * (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\Data; | ||
|
|
||
| /** | ||
| * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage | ||
| */ | ||
| final class ProcessedClassType | ||
| { | ||
| public readonly string $className; | ||
| public readonly string $namespace; | ||
|
|
||
| /** | ||
| * @var array<string, ProcessedMethodType> | ||
| */ | ||
| public array $methods; | ||
| public readonly int $startLine; | ||
| public int $executableLines; | ||
| public int $executedLines; | ||
| public int $executableBranches; | ||
| public int $executedBranches; | ||
| public int $executablePaths; | ||
| public int $executedPaths; | ||
| public int $ccn; | ||
| public float|int $coverage; | ||
| public int|string $crap; | ||
| public readonly string $link; | ||
|
|
||
| public function __construct( | ||
| string $className, | ||
| string $namespace, | ||
| /** | ||
| * @var array<string, ProcessedMethodType> | ||
| */ | ||
| array $methods, | ||
| int $startLine, | ||
| int $executableLines, | ||
| int $executedLines, | ||
| int $executableBranches, | ||
| int $executedBranches, | ||
| int $executablePaths, | ||
| int $executedPaths, | ||
| int $ccn, | ||
| float|int $coverage, | ||
| int|string $crap, | ||
| string $link, | ||
| ) { | ||
| $this->className = $className; | ||
| $this->namespace = $namespace; | ||
| $this->methods = $methods; | ||
| $this->startLine = $startLine; | ||
| $this->executableLines = $executableLines; | ||
| $this->executedLines = $executedLines; | ||
| $this->executableBranches = $executableBranches; | ||
| $this->executedBranches = $executedBranches; | ||
| $this->executablePaths = $executablePaths; | ||
| $this->executedPaths = $executedPaths; | ||
| $this->ccn = $ccn; | ||
| $this->coverage = $coverage; | ||
| $this->crap = $crap; | ||
| $this->link = $link; | ||
| } | ||
| } |
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,66 @@ | ||
| <?php declare(strict_types=1); | ||
| /* | ||
| * This file is part of phpunit/php-code-coverage. | ||
| * | ||
| * (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\Data; | ||
|
|
||
| /** | ||
| * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage | ||
| */ | ||
| final class ProcessedFunctionType | ||
| { | ||
| public readonly string $functionName; | ||
| public readonly string $namespace; | ||
| public readonly string $signature; | ||
| public readonly int $startLine; | ||
| public readonly int $endLine; | ||
| public int $executableLines; | ||
| public int $executedLines; | ||
| public int $executableBranches; | ||
| public int $executedBranches; | ||
| public int $executablePaths; | ||
| public int $executedPaths; | ||
| public int $ccn; | ||
| public float|int $coverage; | ||
| public int|string $crap; | ||
| public readonly string $link; | ||
|
|
||
| public function __construct( | ||
| string $functionName, | ||
| string $namespace, | ||
| string $signature, | ||
| int $startLine, | ||
| int $endLine, | ||
| int $executableLines, | ||
| int $executedLines, | ||
| int $executableBranches, | ||
| int $executedBranches, | ||
| int $executablePaths, | ||
| int $executedPaths, | ||
| int $ccn, | ||
| float|int $coverage, | ||
| int|string $crap, | ||
| string $link, | ||
| ) { | ||
| $this->link = $link; | ||
| $this->crap = $crap; | ||
| $this->coverage = $coverage; | ||
| $this->ccn = $ccn; | ||
| $this->executedPaths = $executedPaths; | ||
| $this->executablePaths = $executablePaths; | ||
| $this->executedBranches = $executedBranches; | ||
| $this->executableBranches = $executableBranches; | ||
| $this->executedLines = $executedLines; | ||
| $this->executableLines = $executableLines; | ||
| $this->endLine = $endLine; | ||
| $this->startLine = $startLine; | ||
| $this->signature = $signature; | ||
| $this->namespace = $namespace; | ||
| $this->functionName = $functionName; | ||
| } | ||
| } |
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,66 @@ | ||
| <?php declare(strict_types=1); | ||
| /* | ||
| * This file is part of phpunit/php-code-coverage. | ||
| * | ||
| * (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\Data; | ||
|
|
||
| /** | ||
| * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage | ||
| */ | ||
| final class ProcessedMethodType | ||
| { | ||
| public readonly string $methodName; | ||
| public readonly string $visibility; | ||
| public readonly string $signature; | ||
| public readonly int $startLine; | ||
| public readonly int $endLine; | ||
| public int $executableLines; | ||
| public int $executedLines; | ||
| public int $executableBranches; | ||
| public int $executedBranches; | ||
| public int $executablePaths; | ||
| public int $executedPaths; | ||
| public int $ccn; | ||
| public float|int $coverage; | ||
| public int|string $crap; | ||
| public readonly string $link; | ||
|
|
||
| public function __construct( | ||
| string $methodName, | ||
| string $visibility, | ||
| string $signature, | ||
| int $startLine, | ||
| int $endLine, | ||
| int $executableLines, | ||
| int $executedLines, | ||
| int $executableBranches, | ||
| int $executedBranches, | ||
| int $executablePaths, | ||
| int $executedPaths, | ||
| int $ccn, | ||
| float|int $coverage, | ||
| int|string $crap, | ||
| string $link, | ||
| ) { | ||
| $this->link = $link; | ||
| $this->crap = $crap; | ||
| $this->coverage = $coverage; | ||
| $this->ccn = $ccn; | ||
| $this->executedPaths = $executedPaths; | ||
| $this->executablePaths = $executablePaths; | ||
| $this->executedBranches = $executedBranches; | ||
| $this->executableBranches = $executableBranches; | ||
| $this->executedLines = $executedLines; | ||
| $this->executableLines = $executableLines; | ||
| $this->endLine = $endLine; | ||
| $this->startLine = $startLine; | ||
| $this->signature = $signature; | ||
| $this->visibility = $visibility; | ||
| $this->methodName = $methodName; | ||
| } | ||
| } |
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,70 @@ | ||
| <?php declare(strict_types=1); | ||
| /* | ||
| * This file is part of phpunit/php-code-coverage. | ||
| * | ||
| * (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\Data; | ||
|
|
||
| /** | ||
| * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage | ||
| */ | ||
| final class ProcessedTraitType | ||
| { | ||
| public readonly string $traitName; | ||
| public readonly string $namespace; | ||
|
|
||
| /** | ||
| * @var array<string, ProcessedMethodType> | ||
| */ | ||
| public array $methods; | ||
| public readonly int $startLine; | ||
| public int $executableLines; | ||
| public int $executedLines; | ||
| public int $executableBranches; | ||
| public int $executedBranches; | ||
| public int $executablePaths; | ||
| public int $executedPaths; | ||
| public int $ccn; | ||
| public float|int $coverage; | ||
| public int|string $crap; | ||
| public readonly string $link; | ||
|
|
||
| public function __construct( | ||
| string $traitName, | ||
| string $namespace, | ||
| /** | ||
| * @var array<string, ProcessedMethodType> | ||
| */ | ||
| array $methods, | ||
| int $startLine, | ||
| int $executableLines, | ||
| int $executedLines, | ||
| int $executableBranches, | ||
| int $executedBranches, | ||
| int $executablePaths, | ||
| int $executedPaths, | ||
| int $ccn, | ||
| float|int $coverage, | ||
| int|string $crap, | ||
| string $link, | ||
| ) { | ||
| $this->link = $link; | ||
| $this->crap = $crap; | ||
| $this->coverage = $coverage; | ||
| $this->ccn = $ccn; | ||
| $this->executedPaths = $executedPaths; | ||
| $this->executablePaths = $executablePaths; | ||
| $this->executedBranches = $executedBranches; | ||
| $this->executableBranches = $executableBranches; | ||
| $this->executedLines = $executedLines; | ||
| $this->executableLines = $executableLines; | ||
| $this->startLine = $startLine; | ||
| $this->methods = $methods; | ||
| $this->namespace = $namespace; | ||
| $this->traitName = $traitName; | ||
| } | ||
| } |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.