Skip to content

Commit 13d2d05

Browse files
committed
Refactor ViolationRecord to use pre 8.2 readonly syntax without marking the class as readonly
1 parent b183120 commit 13d2d05

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

‎src/Internal/Reporting/ViolationRecord.php‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@
99
/**
1010
* @internal Immutable value object representing a single type contract violation.
1111
*/
12-
final readonly class ViolationRecord implements JsonSerializable
12+
final class ViolationRecord implements JsonSerializable
1313
{
1414
/**
1515
* @param 'parameter'|'return'|'property'|'variable'|'param-out'|'self-out'|'callback'|'yield'|'send' $kind
1616
*/
1717
public function __construct(
18-
public string $file,
19-
public int $line,
20-
public string $function,
21-
public string $kind,
22-
public string $target,
23-
public string $expected,
24-
public string $given,
25-
public string $message,
26-
public int $count = 1,
27-
public ?string $caller = null,
28-
public ?string $declaredIn = null
18+
public readonly string $file,
19+
public readonly int $line,
20+
public readonly string $function,
21+
public readonly string $kind,
22+
public readonly string $target,
23+
public readonly string $expected,
24+
public readonly string $given,
25+
public readonly string $message,
26+
public readonly int $count = 1,
27+
public readonly ?string $caller = null,
28+
public readonly ?string $declaredIn = null
2929
) {
3030
}
3131

0 commit comments

Comments
 (0)