Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/Data/ProcessedClassType.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ final class ProcessedClassType
public readonly int $startLine;
public int $executableLines;
public int $executedLines;
public int $executedLinesBySmallTests = 0;
public int $executedLinesByMediumTests = 0;
public int $executedLinesByLargeTests = 0;
public int $executedLinesBySmallOrMediumTests = 0;
public int $executedLinesBySmallOrMediumOrLargeTests = 0;
public int $executableBranches;
public int $executedBranches;
public int $executablePaths;
Expand Down
5 changes: 5 additions & 0 deletions src/Data/ProcessedFunctionType.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ final class ProcessedFunctionType
public readonly int $endLine;
public int $executableLines;
public int $executedLines;
public int $executedLinesBySmallTests = 0;
public int $executedLinesByMediumTests = 0;
public int $executedLinesByLargeTests = 0;
public int $executedLinesBySmallOrMediumTests = 0;
public int $executedLinesBySmallOrMediumOrLargeTests = 0;
public int $executableBranches;
public int $executedBranches;
public int $executablePaths;
Expand Down
5 changes: 5 additions & 0 deletions src/Data/ProcessedMethodType.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ final class ProcessedMethodType
public readonly int $endLine;
public int $executableLines;
public int $executedLines;
public int $executedLinesBySmallTests = 0;
public int $executedLinesByMediumTests = 0;
public int $executedLinesByLargeTests = 0;
public int $executedLinesBySmallOrMediumTests = 0;
public int $executedLinesBySmallOrMediumOrLargeTests = 0;
public int $executableBranches;
public int $executedBranches;
public int $executablePaths;
Expand Down
5 changes: 5 additions & 0 deletions src/Data/ProcessedTraitType.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ final class ProcessedTraitType
public readonly int $startLine;
public int $executableLines;
public int $executedLines;
public int $executedLinesBySmallTests = 0;
public int $executedLinesByMediumTests = 0;
public int $executedLinesByLargeTests = 0;
public int $executedLinesBySmallOrMediumTests = 0;
public int $executedLinesBySmallOrMediumOrLargeTests = 0;
public int $executableBranches;
public int $executedBranches;
public int $executablePaths;
Expand Down
140 changes: 140 additions & 0 deletions src/Node/AbstractNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,46 @@ public function percentageOfExecutedLines(): Percentage
);
}

public function percentageOfExecutedLinesBySmallTests(): Percentage
{
return Percentage::fromFractionAndTotal(
$this->numberOfExecutedLinesBySmallTests(),
$this->numberOfExecutableLines(),
);
}

public function percentageOfExecutedLinesByMediumTests(): Percentage
{
return Percentage::fromFractionAndTotal(
$this->numberOfExecutedLinesByMediumTests(),
$this->numberOfExecutableLines(),
);
}

public function percentageOfExecutedLinesByLargeTests(): Percentage
{
return Percentage::fromFractionAndTotal(
$this->numberOfExecutedLinesByLargeTests(),
$this->numberOfExecutableLines(),
);
}

public function percentageOfExecutedLinesBySmallOrMediumTests(): Percentage
{
return Percentage::fromFractionAndTotal(
$this->numberOfExecutedLinesBySmallOrMediumTests(),
$this->numberOfExecutableLines(),
);
}

public function percentageOfExecutedLinesBySmallOrMediumOrLargeTests(): Percentage
{
return Percentage::fromFractionAndTotal(
$this->numberOfExecutedLinesBySmallOrMediumOrLargeTests(),
$this->numberOfExecutableLines(),
);
}

public function percentageOfExecutedBranches(): Percentage
{
return Percentage::fromFractionAndTotal(
Expand All @@ -161,6 +201,31 @@ public function numberOfTestedClassesAndTraits(): int
return $this->numberOfTestedClasses() + $this->numberOfTestedTraits();
}

public function numberOfTestedClassesAndTraitsBySmallTests(): int
{
return $this->numberOfTestedClassesBySmallTests() + $this->numberOfTestedTraitsBySmallTests();
}

public function numberOfTestedClassesAndTraitsByMediumTests(): int
{
return $this->numberOfTestedClassesByMediumTests() + $this->numberOfTestedTraitsByMediumTests();
}

public function numberOfTestedClassesAndTraitsByLargeTests(): int
{
return $this->numberOfTestedClassesByLargeTests() + $this->numberOfTestedTraitsByLargeTests();
}

public function numberOfTestedClassesAndTraitsBySmallOrMediumTests(): int
{
return $this->numberOfTestedClassesBySmallOrMediumTests() + $this->numberOfTestedTraitsBySmallOrMediumTests();
}

public function numberOfTestedClassesAndTraitsBySmallOrMediumOrLargeTests(): int
{
return $this->numberOfTestedClassesBySmallOrMediumOrLargeTests() + $this->numberOfTestedTraitsBySmallOrMediumOrLargeTests();
}

/**
* @return array<string, ProcessedClassType|ProcessedTraitType>
*/
Expand All @@ -179,6 +244,31 @@ public function numberOfTestedFunctionsAndMethods(): int
return $this->numberOfTestedFunctions() + $this->numberOfTestedMethods();
}

public function numberOfTestedFunctionsAndMethodsBySmallTests(): int
{
return $this->numberOfTestedFunctionsBySmallTests() + $this->numberOfTestedMethodsBySmallTests();
}

public function numberOfTestedFunctionsAndMethodsByMediumTests(): int
{
return $this->numberOfTestedFunctionsByMediumTests() + $this->numberOfTestedMethodsByMediumTests();
}

public function numberOfTestedFunctionsAndMethodsByLargeTests(): int
{
return $this->numberOfTestedFunctionsByLargeTests() + $this->numberOfTestedMethodsByLargeTests();
}

public function numberOfTestedFunctionsAndMethodsBySmallOrMediumTests(): int
{
return $this->numberOfTestedFunctionsBySmallOrMediumTests() + $this->numberOfTestedMethodsBySmallOrMediumTests();
}

public function numberOfTestedFunctionsAndMethodsBySmallOrMediumOrLargeTests(): int
{
return $this->numberOfTestedFunctionsBySmallOrMediumOrLargeTests() + $this->numberOfTestedMethodsBySmallOrMediumOrLargeTests();
}

/**
* @return non-negative-int
*/
Expand Down Expand Up @@ -218,6 +308,16 @@ abstract public function numberOfExecutableLines(): int;

abstract public function numberOfExecutedLines(): int;

abstract public function numberOfExecutedLinesBySmallTests(): int;

abstract public function numberOfExecutedLinesByMediumTests(): int;

abstract public function numberOfExecutedLinesByLargeTests(): int;

abstract public function numberOfExecutedLinesBySmallOrMediumTests(): int;

abstract public function numberOfExecutedLinesBySmallOrMediumOrLargeTests(): int;

abstract public function numberOfExecutableBranches(): int;

abstract public function numberOfExecutedBranches(): int;
Expand All @@ -230,18 +330,58 @@ abstract public function numberOfClasses(): int;

abstract public function numberOfTestedClasses(): int;

abstract public function numberOfTestedClassesBySmallTests(): int;

abstract public function numberOfTestedClassesByMediumTests(): int;

abstract public function numberOfTestedClassesByLargeTests(): int;

abstract public function numberOfTestedClassesBySmallOrMediumTests(): int;

abstract public function numberOfTestedClassesBySmallOrMediumOrLargeTests(): int;

abstract public function numberOfTraits(): int;

abstract public function numberOfTestedTraits(): int;

abstract public function numberOfTestedTraitsBySmallTests(): int;

abstract public function numberOfTestedTraitsByMediumTests(): int;

abstract public function numberOfTestedTraitsByLargeTests(): int;

abstract public function numberOfTestedTraitsBySmallOrMediumTests(): int;

abstract public function numberOfTestedTraitsBySmallOrMediumOrLargeTests(): int;

abstract public function numberOfMethods(): int;

abstract public function numberOfTestedMethods(): int;

abstract public function numberOfTestedMethodsBySmallTests(): int;

abstract public function numberOfTestedMethodsByMediumTests(): int;

abstract public function numberOfTestedMethodsByLargeTests(): int;

abstract public function numberOfTestedMethodsBySmallOrMediumTests(): int;

abstract public function numberOfTestedMethodsBySmallOrMediumOrLargeTests(): int;

abstract public function numberOfFunctions(): int;

abstract public function numberOfTestedFunctions(): int;

abstract public function numberOfTestedFunctionsBySmallTests(): int;

abstract public function numberOfTestedFunctionsByMediumTests(): int;

abstract public function numberOfTestedFunctionsByLargeTests(): int;

abstract public function numberOfTestedFunctionsBySmallOrMediumTests(): int;

abstract public function numberOfTestedFunctionsBySmallOrMediumOrLargeTests(): int;

private function processId(): void
{
if ($this->parent === null) {
Expand Down
Loading
Loading