Skip to content

Commit 52c87f2

Browse files
Narrow types
1 parent 9c399d2 commit 52c87f2

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed

src/Event/Emitter/DispatchingEmitter.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,6 +1140,8 @@ public function testRunnerFinishedStaticAnalysisForCodeCoverage(int $cacheHits,
11401140
}
11411141

11421142
/**
1143+
* @param non-empty-string $message
1144+
*
11431145
* @throws InvalidArgumentException
11441146
* @throws UnknownEventTypeException
11451147
*/
@@ -1154,6 +1156,8 @@ public function testRunnerTriggeredPhpunitDeprecation(string $message): void
11541156
}
11551157

11561158
/**
1159+
* @param non-empty-string $message
1160+
*
11571161
* @throws InvalidArgumentException
11581162
* @throws UnknownEventTypeException
11591163
*/

src/Event/Emitter/Emitter.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ public function testRunnerDisabledGarbageCollection(): void;
6666

6767
public function testRunnerTriggeredGarbageCollection(): void;
6868

69+
/**
70+
* @param non-empty-string $message
71+
*/
6972
public function testSuiteSkipped(TestSuite $testSuite, string $message): void;
7073

7174
public function testSuiteStarted(TestSuite $testSuite): void;
@@ -146,6 +149,9 @@ public function testConsideredRisky(Code\Test $test, string $message): void;
146149

147150
public function testMarkedAsIncomplete(Code\Test $test, Throwable $throwable): void;
148151

152+
/**
153+
* @param non-empty-string $message
154+
*/
149155
public function testSkipped(Code\Test $test, string $message): void;
150156

151157
/**
@@ -264,8 +270,14 @@ public function testRunnerStartedStaticAnalysisForCodeCoverage(): void;
264270
*/
265271
public function testRunnerFinishedStaticAnalysisForCodeCoverage(int $cacheHits, int $cacheMisses): void;
266272

273+
/**
274+
* @param non-empty-string $message
275+
*/
267276
public function testRunnerTriggeredPhpunitDeprecation(string $message): void;
268277

278+
/**
279+
* @param non-empty-string $message
280+
*/
269281
public function testRunnerTriggeredPhpunitWarning(string $message): void;
270282

271283
public function testRunnerEnabledGarbageCollection(): void;

src/Event/Events/TestRunner/DeprecationTriggered.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,15 @@
2121
final readonly class DeprecationTriggered implements Event
2222
{
2323
private Telemetry\Info $telemetryInfo;
24+
25+
/**
26+
* @var non-empty-string
27+
*/
2428
private string $message;
2529

30+
/**
31+
* @param non-empty-string $message
32+
*/
2633
public function __construct(Telemetry\Info $telemetryInfo, string $message)
2734
{
2835
$this->telemetryInfo = $telemetryInfo;
@@ -34,6 +41,9 @@ public function telemetryInfo(): Telemetry\Info
3441
return $this->telemetryInfo;
3542
}
3643

44+
/**
45+
* @return non-empty-string
46+
*/
3747
public function message(): string
3848
{
3949
return $this->message;

src/Event/Events/TestRunner/WarningTriggered.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,15 @@
2121
final readonly class WarningTriggered implements Event
2222
{
2323
private Telemetry\Info $telemetryInfo;
24+
25+
/**
26+
* @var non-empty-string
27+
*/
2428
private string $message;
2529

30+
/**
31+
* @param non-empty-string $message
32+
*/
2633
public function __construct(Telemetry\Info $telemetryInfo, string $message)
2734
{
2835
$this->telemetryInfo = $telemetryInfo;
@@ -34,6 +41,9 @@ public function telemetryInfo(): Telemetry\Info
3441
return $this->telemetryInfo;
3542
}
3643

44+
/**
45+
* @return non-empty-string
46+
*/
3747
public function message(): string
3848
{
3949
return $this->message;

0 commit comments

Comments
 (0)