Skip to content

Commit d8bf935

Browse files
staabmsebastianbergmann
authored andcommitted
use traditional properties
1 parent d2374c9 commit d8bf935

File tree

3 files changed

+61
-18
lines changed

3 files changed

+61
-18
lines changed

src/Data/ProcessedBranchCoverageData.php

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,20 @@
2222
*/
2323
final class ProcessedBranchCoverageData
2424
{
25+
public readonly int $op_start;
26+
public readonly int $op_end;
27+
public readonly int $line_start;
28+
public readonly int $line_end;
29+
30+
/** @var list<TestIdType> */
31+
public array $hit;
32+
33+
/** @var array<int, int> */
34+
public readonly array $out;
35+
36+
/** @var array<int, int> */
37+
public readonly array $out_hit;
38+
2539
/**
2640
* @param XdebugBranchCoverageType $xdebugCoverageData
2741
*/
@@ -38,18 +52,27 @@ public static function fromXdebugCoverage(array $xdebugCoverageData): self
3852
);
3953
}
4054

55+
/**
56+
* @param list<TestIdType> $hit
57+
* @param array<int, int> $out
58+
* @param array<int, int> $out_hit
59+
*/
4160
public function __construct(
42-
public readonly int $op_start,
43-
public readonly int $op_end,
44-
public readonly int $line_start,
45-
public readonly int $line_end,
46-
/** @var list<TestIdType> */
47-
public array $hit,
48-
/** @var array<int, int> */
49-
public readonly array $out,
50-
/** @var array<int, int> */
51-
public readonly array $out_hit,
61+
int $op_start,
62+
int $op_end,
63+
int $line_start,
64+
int $line_end,
65+
array $hit,
66+
array $out,
67+
array $out_hit,
5268
) {
69+
$this->out_hit = $out_hit;
70+
$this->out = $out;
71+
$this->hit = $hit;
72+
$this->line_end = $line_end;
73+
$this->line_start = $line_start;
74+
$this->op_end = $op_end;
75+
$this->op_start = $op_start;
5376
}
5477

5578
#[NoDiscard]

src/Data/ProcessedFunctionCoverageData.php

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@
2020
*/
2121
final readonly class ProcessedFunctionCoverageData
2222
{
23+
/** @var array<int, ProcessedBranchCoverageData> */
24+
public array $branches;
25+
26+
/** @var array<int, ProcessedPathCoverageData> */
27+
public array $paths;
28+
2329
/**
2430
* @param XdebugFunctionCoverageType $xdebugCoverageData
2531
*/
@@ -42,12 +48,16 @@ public static function fromXdebugCoverage(array $xdebugCoverageData): self
4248
);
4349
}
4450

51+
/**
52+
* @param array<int, ProcessedBranchCoverageData> $branches
53+
* @param array<int, ProcessedPathCoverageData> $paths
54+
*/
4555
public function __construct(
46-
/** @var array<int, ProcessedBranchCoverageData> */
47-
public array $branches,
48-
/** @var array<int, ProcessedPathCoverageData> */
49-
public array $paths,
56+
array $branches,
57+
array $paths,
5058
) {
59+
$this->paths = $paths;
60+
$this->branches = $branches;
5161
}
5262

5363
#[NoDiscard]

src/Data/ProcessedPathCoverageData.php

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@
2222
*/
2323
final class ProcessedPathCoverageData
2424
{
25+
/** @var array<int, int> */
26+
public readonly array $path;
27+
28+
/** @var list<TestIdType> */
29+
public array $hit;
30+
2531
/**
2632
* @param XdebugPathCoverageType $xdebugCoverageData
2733
*/
@@ -33,12 +39,16 @@ public static function fromXdebugCoverage(array $xdebugCoverageData): self
3339
);
3440
}
3541

42+
/**
43+
* @param array<int, int> $path
44+
* @param list<TestIdType> $hit
45+
*/
3646
public function __construct(
37-
/** @var array<int, int> */
38-
public readonly array $path,
39-
/** @var list<TestIdType> */
40-
public array $hit,
47+
array $path,
48+
array $hit,
4149
) {
50+
$this->hit = $hit;
51+
$this->path = $path;
4252
}
4353

4454
#[NoDiscard]

0 commit comments

Comments
 (0)