Skip to content

Commit 2081c9f

Browse files
Narrow types
1 parent ebf9306 commit 2081c9f

File tree

77 files changed

+297
-0
lines changed

Some content is hidden

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

77 files changed

+297
-0
lines changed

src/Event/Emitter/DispatchingEmitter.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ public function testRunnerConfigured(Configuration $configuration): void
9191
}
9292

9393
/**
94+
* @param non-empty-string $filename
95+
*
9496
* @throws InvalidArgumentException
9597
* @throws UnknownEventTypeException
9698
*/
@@ -105,6 +107,10 @@ public function testRunnerBootstrapFinished(string $filename): void
105107
}
106108

107109
/**
110+
* @param non-empty-string $filename
111+
* @param non-empty-string $name
112+
* @param non-empty-string $version
113+
*
108114
* @throws InvalidArgumentException
109115
* @throws UnknownEventTypeException
110116
*/
@@ -928,6 +934,8 @@ public function testPrintedUnexpectedOutput(string $output): void
928934
}
929935

930936
/**
937+
* @param non-negative-int $numberOfAssertionsPerformed
938+
*
931939
* @throws InvalidArgumentException
932940
* @throws UnknownEventTypeException
933941
*/
@@ -1114,6 +1122,9 @@ public function testRunnerStartedStaticAnalysisForCodeCoverage(): void
11141122
}
11151123

11161124
/**
1125+
* @param non-negative-int $cacheHits
1126+
* @param non-negative-int $cacheMisses
1127+
*
11171128
* @throws InvalidArgumentException
11181129
* @throws UnknownEventTypeException
11191130
*/

src/Event/Emitter/Emitter.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,16 @@ public function testRunnerStarted(): void;
3030

3131
public function testRunnerConfigured(Configuration $configuration): void;
3232

33+
/**
34+
* @param non-empty-string $filename
35+
*/
3336
public function testRunnerBootstrapFinished(string $filename): void;
3437

38+
/**
39+
* @param non-empty-string $filename
40+
* @param non-empty-string $name
41+
* @param non-empty-string $version
42+
*/
3543
public function testRunnerLoadedExtensionFromPhar(string $filename, string $name, string $version): void;
3644

3745
/**
@@ -210,6 +218,9 @@ public function testTriggeredPhpunitWarning(Code\Test $test, string $message): v
210218
*/
211219
public function testPrintedUnexpectedOutput(string $output): void;
212220

221+
/**
222+
* @param non-negative-int $numberOfAssertionsPerformed
223+
*/
213224
public function testFinished(Code\Test $test, int $numberOfAssertionsPerformed): void;
214225

215226
public function postConditionCalled(TestMethod $test, ClassMethod $calledMethod): void;
@@ -247,6 +258,10 @@ public function testRunnerFinishedChildProcess(string $stdout, string $stderr):
247258

248259
public function testRunnerStartedStaticAnalysisForCodeCoverage(): void;
249260

261+
/**
262+
* @param non-negative-int $cacheHits
263+
* @param non-negative-int $cacheMisses
264+
*/
250265
public function testRunnerFinishedStaticAnalysisForCodeCoverage(int $cacheHits, int $cacheMisses): void;
251266

252267
public function testRunnerTriggeredPhpunitDeprecation(string $message): void;

src/Event/Events/Application/Finished.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ public function shellExitCode(): int
3939
return $this->shellExitCode;
4040
}
4141

42+
/**
43+
* @return non-empty-string
44+
*/
4245
public function asString(): string
4346
{
4447
return sprintf(

src/Event/Events/Application/Started.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ public function runtime(): Runtime
4040
return $this->runtime;
4141
}
4242

43+
/**
44+
* @return non-empty-string
45+
*/
4346
public function asString(): string
4447
{
4548
return sprintf(

src/Event/Events/Event.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,8 @@ interface Event
1616
{
1717
public function telemetryInfo(): Telemetry\Info;
1818

19+
/**
20+
* @return non-empty-string
21+
*/
1922
public function asString(): string;
2023
}

src/Event/Events/Test/ComparatorRegistered.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ public function className(): string
4949
return $this->className;
5050
}
5151

52+
/**
53+
* @return non-empty-string
54+
*/
5255
public function asString(): string
5356
{
5457
return sprintf(

src/Event/Events/Test/HookMethod/AfterLastTestMethodCalled.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ public function calledMethod(): Code\ClassMethod
5757
return $this->calledMethod;
5858
}
5959

60+
/**
61+
* @return non-empty-string
62+
*/
6063
public function asString(): string
6164
{
6265
return sprintf(

src/Event/Events/Test/HookMethod/AfterLastTestMethodErrored.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ public function throwable(): Throwable
6666
return $this->throwable;
6767
}
6868

69+
/**
70+
* @return non-empty-string
71+
*/
6972
public function asString(): string
7073
{
7174
$message = $this->throwable->message();

src/Event/Events/Test/HookMethod/AfterLastTestMethodFinished.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ public function calledMethods(): array
6565
return $this->calledMethods;
6666
}
6767

68+
/**
69+
* @return non-empty-string
70+
*/
6871
public function asString(): string
6972
{
7073
$buffer = 'After Last Test Method Finished:';

src/Event/Events/Test/HookMethod/AfterTestMethodCalled.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ public function calledMethod(): Code\ClassMethod
5757
return $this->calledMethod;
5858
}
5959

60+
/**
61+
* @return non-empty-string
62+
*/
6063
public function asString(): string
6164
{
6265
return sprintf(

0 commit comments

Comments
 (0)