Skip to content

Commit d82f5ad

Browse files
Declare classes readonly
1 parent b3016e8 commit d82f5ad

File tree

343 files changed

+572
-562
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

343 files changed

+572
-562
lines changed

.psalm/baseline.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@
8181
</PropertyTypeCoercion>
8282
</file>
8383
<file src="src/Event/Value/Test/TestData/TestDataCollection.php">
84+
<PropertyNotSetInConstructor>
85+
<code>$fromDataProvider</code>
86+
</PropertyNotSetInConstructor>
8487
<PropertyTypeCoercion>
8588
<code>$data</code>
8689
</PropertyTypeCoercion>

src/Event/Value/ComparisonFailureBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/**
1919
* @internal This class is not covered by the backward compatibility promise for PHPUnit
2020
*/
21-
final class ComparisonFailureBuilder
21+
final readonly class ComparisonFailureBuilder
2222
{
2323
public static function from(Throwable $t): ?ComparisonFailure
2424
{

src/Event/Value/Telemetry/Php81GarbageCollectorStatusProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/**
1515
* @internal This class is not covered by the backward compatibility promise for PHPUnit
1616
*/
17-
final class Php81GarbageCollectorStatusProvider implements GarbageCollectorStatusProvider
17+
final readonly class Php81GarbageCollectorStatusProvider implements GarbageCollectorStatusProvider
1818
{
1919
public function status(): GarbageCollectorStatus
2020
{

src/Event/Value/Telemetry/Php83GarbageCollectorStatusProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/**
1515
* @internal This class is not covered by the backward compatibility promise for PHPUnit
1616
*/
17-
final class Php83GarbageCollectorStatusProvider implements GarbageCollectorStatusProvider
17+
final readonly class Php83GarbageCollectorStatusProvider implements GarbageCollectorStatusProvider
1818
{
1919
public function status(): GarbageCollectorStatus
2020
{

src/Event/Value/Telemetry/SystemMemoryMeter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/**
1616
* @internal This class is not covered by the backward compatibility promise for PHPUnit
1717
*/
18-
final class SystemMemoryMeter implements MemoryMeter
18+
final readonly class SystemMemoryMeter implements MemoryMeter
1919
{
2020
public function memoryUsage(): MemoryUsage
2121
{

src/Event/Value/Telemetry/SystemStopWatch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/**
1616
* @internal This class is not covered by the backward compatibility promise for PHPUnit
1717
*/
18-
final class SystemStopWatch implements StopWatch
18+
final readonly class SystemStopWatch implements StopWatch
1919
{
2020
/**
2121
* @throws InvalidArgumentException

src/Event/Value/Test/Phpt.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1616
*/
17-
final class Phpt extends Test
17+
final readonly class Phpt extends Test
1818
{
1919
/**
2020
* @psalm-assert-if-true Phpt $this

src/Event/Value/Test/Test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
*
1515
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1616
*/
17-
abstract class Test
17+
abstract readonly class Test
1818
{
1919
/**
2020
* @psalm-var non-empty-string
2121
*/
22-
private readonly string $file;
22+
private string $file;
2323

2424
/**
2525
* @psalm-param non-empty-string $file

src/Event/Value/Test/TestData/DataFromDataProvider.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
*
1515
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1616
*/
17-
final class DataFromDataProvider extends TestData
17+
final readonly class DataFromDataProvider extends TestData
1818
{
19-
private readonly int|string $dataSetName;
20-
private readonly string $dataAsStringForResultOutput;
19+
private int|string $dataSetName;
20+
private string $dataAsStringForResultOutput;
2121

2222
public static function from(int|string $dataSetName, string $data, string $dataAsStringForResultOutput): self
2323
{

src/Event/Value/Test/TestData/DataFromTestDependency.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1616
*/
17-
final class DataFromTestDependency extends TestData
17+
final readonly class DataFromTestDependency extends TestData
1818
{
1919
public static function from(string $data): self
2020
{

0 commit comments

Comments
 (0)