Skip to content

Commit d6affa8

Browse files
Merge branch '10.5'
2 parents ea7ac81 + e604b33 commit d6affa8

File tree

6 files changed

+140
-24
lines changed

6 files changed

+140
-24
lines changed

.psalm/baseline.xml

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,6 @@
66
</UndefinedInterfaceMethod>
77
</file>
88
<file src="src/Event/Emitter/DispatchingEmitter.php">
9-
<ArgumentTypeCoercion>
10-
<code>$file</code>
11-
<code>$file</code>
12-
<code>$file</code>
13-
<code>$file</code>
14-
<code>$file</code>
15-
<code>$file</code>
16-
<code>$file</code>
17-
<code>$line</code>
18-
<code>$line</code>
19-
<code>$line</code>
20-
<code>$line</code>
21-
<code>$line</code>
22-
<code>$line</code>
23-
<code>$line</code>
24-
<code>$message</code>
25-
<code>$message</code>
26-
<code>$message</code>
27-
<code>$message</code>
28-
<code>$message</code>
29-
<code>$message</code>
30-
<code>$message</code>
31-
<code>$message</code>
32-
</ArgumentTypeCoercion>
339
<RedundantCondition>
3410
<code>assert($test instanceof TestMethod)</code>
3511
</RedundantCondition>
@@ -338,6 +314,7 @@
338314
</file>
339315
<file src="src/Framework/TestCase.php">
340316
<ArgumentTypeCoercion>
317+
<code><![CDATA[$e->getMessage()]]></code>
341318
<code>$mockClassName</code>
342319
<code>$originalClassName</code>
343320
<code><![CDATA[$this->expectedException]]></code>
@@ -364,6 +341,7 @@
364341
</file>
365342
<file src="src/Framework/TestRunner.php">
366343
<ArgumentTypeCoercion>
344+
<code><![CDATA[$cce->getMessage()]]></code>
367345
<code><![CDATA[$test->output()]]></code>
368346
</ArgumentTypeCoercion>
369347
<InvalidArgument>
@@ -592,8 +570,29 @@
592570
<file src="src/Runner/ErrorHandler.php">
593571
<ArgumentTypeCoercion>
594572
<code>$errorFile</code>
573+
<code>$errorFile</code>
574+
<code>$errorFile</code>
575+
<code>$errorFile</code>
576+
<code>$errorFile</code>
577+
<code>$errorFile</code>
578+
<code>$errorFile</code>
579+
<code>$errorFile</code>
580+
<code>$errorLine</code>
581+
<code>$errorLine</code>
582+
<code>$errorLine</code>
583+
<code>$errorLine</code>
584+
<code>$errorLine</code>
585+
<code>$errorLine</code>
586+
<code>$errorLine</code>
595587
<code>$errorLine</code>
596588
<code>$errorString</code>
589+
<code>$errorString</code>
590+
<code>$errorString</code>
591+
<code>$errorString</code>
592+
<code>$errorString</code>
593+
<code>$errorString</code>
594+
<code>$errorString</code>
595+
<code>$errorString</code>
597596
</ArgumentTypeCoercion>
598597
<MissingThrowsDocblock>
599598
<code>Issue::from($file, $line, null, $description)</code>
@@ -626,6 +625,9 @@
626625
</MissingTemplateParam>
627626
</file>
628627
<file src="src/Runner/PhptTestCase.php">
628+
<ArgumentTypeCoercion>
629+
<code>$message</code>
630+
</ArgumentTypeCoercion>
629631
<InternalClass>
630632
<code>RawCodeCoverageData::fromXdebugWithoutPathCoverage([])</code>
631633
<code>RawCodeCoverageData::fromXdebugWithoutPathCoverage([])</code>

src/Event/Emitter/DispatchingEmitter.php

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,8 @@ public function testSkipped(Code\Test $test, string $message): void
709709
}
710710

711711
/**
712+
* @psalm-param non-empty-string $message
713+
*
712714
* @throws InvalidArgumentException
713715
* @throws NoTestCaseObjectOnCallStackException
714716
* @throws UnknownEventTypeException
@@ -737,6 +739,10 @@ public function testTriggeredPhpunitDeprecation(?Code\Test $test, string $messag
737739
}
738740

739741
/**
742+
* @psalm-param non-empty-string $message
743+
* @psalm-param non-empty-string $file
744+
* @psalm-param positive-int $line
745+
*
740746
* @throws InvalidArgumentException
741747
* @throws UnknownEventTypeException
742748
*/
@@ -757,6 +763,10 @@ public function testTriggeredPhpDeprecation(Code\Test $test, string $message, st
757763
}
758764

759765
/**
766+
* @psalm-param non-empty-string $message
767+
* @psalm-param non-empty-string $file
768+
* @psalm-param positive-int $line
769+
*
760770
* @throws InvalidArgumentException
761771
* @throws UnknownEventTypeException
762772
*/
@@ -777,6 +787,10 @@ public function testTriggeredDeprecation(Code\Test $test, string $message, strin
777787
}
778788

779789
/**
790+
* @psalm-param non-empty-string $message
791+
* @psalm-param non-empty-string $file
792+
* @psalm-param positive-int $line
793+
*
780794
* @throws InvalidArgumentException
781795
* @throws UnknownEventTypeException
782796
*/
@@ -795,6 +809,10 @@ public function testTriggeredError(Code\Test $test, string $message, string $fil
795809
}
796810

797811
/**
812+
* @psalm-param non-empty-string $message
813+
* @psalm-param non-empty-string $file
814+
* @psalm-param positive-int $line
815+
*
798816
* @throws InvalidArgumentException
799817
* @throws UnknownEventTypeException
800818
*/
@@ -814,6 +832,10 @@ public function testTriggeredNotice(Code\Test $test, string $message, string $fi
814832
}
815833

816834
/**
835+
* @psalm-param non-empty-string $message
836+
* @psalm-param non-empty-string $file
837+
* @psalm-param positive-int $line
838+
*
817839
* @throws InvalidArgumentException
818840
* @throws UnknownEventTypeException
819841
*/
@@ -833,6 +855,10 @@ public function testTriggeredPhpNotice(Code\Test $test, string $message, string
833855
}
834856

835857
/**
858+
* @psalm-param non-empty-string $message
859+
* @psalm-param non-empty-string $file
860+
* @psalm-param positive-int $line
861+
*
836862
* @throws InvalidArgumentException
837863
* @throws UnknownEventTypeException
838864
*/
@@ -852,6 +878,10 @@ public function testTriggeredWarning(Code\Test $test, string $message, string $f
852878
}
853879

854880
/**
881+
* @psalm-param non-empty-string $message
882+
* @psalm-param non-empty-string $file
883+
* @psalm-param positive-int $line
884+
*
855885
* @throws InvalidArgumentException
856886
* @throws UnknownEventTypeException
857887
*/
@@ -871,6 +901,8 @@ public function testTriggeredPhpWarning(Code\Test $test, string $message, string
871901
}
872902

873903
/**
904+
* @psalm-param non-empty-string $message
905+
*
874906
* @throws InvalidArgumentException
875907
* @throws UnknownEventTypeException
876908
*/
@@ -886,6 +918,8 @@ public function testTriggeredPhpunitError(Code\Test $test, string $message): voi
886918
}
887919

888920
/**
921+
* @psalm-param non-empty-string $message
922+
*
889923
* @throws InvalidArgumentException
890924
* @throws UnknownEventTypeException
891925
*/

src/Event/Emitter/Emitter.php

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,30 +156,80 @@ public function testFailed(Code\Test $test, Throwable $throwable, ?ComparisonFai
156156

157157
public function testPassed(Code\Test $test): void;
158158

159+
/**
160+
* @psalm-param non-empty-string $message
161+
*/
159162
public function testConsideredRisky(Code\Test $test, string $message): void;
160163

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

166+
/**
167+
* @psalm-param non-empty-string $message
168+
*/
163169
public function testSkipped(Code\Test $test, string $message): void;
164170

171+
/**
172+
* @psalm-param non-empty-string $message
173+
*/
165174
public function testTriggeredPhpunitDeprecation(?Code\Test $test, string $message): void;
166175

176+
/**
177+
* @psalm-param non-empty-string $message
178+
* @psalm-param non-empty-string $file
179+
* @psalm-param positive-int $line
180+
*/
167181
public function testTriggeredPhpDeprecation(Code\Test $test, string $message, string $file, int $line, bool $suppressed, bool $ignoredByBaseline, bool $ignoredByTest): void;
168182

183+
/**
184+
* @psalm-param non-empty-string $message
185+
* @psalm-param non-empty-string $file
186+
* @psalm-param positive-int $line
187+
*/
169188
public function testTriggeredDeprecation(Code\Test $test, string $message, string $file, int $line, bool $suppressed, bool $ignoredByBaseline, bool $ignoredByTest): void;
170189

190+
/**
191+
* @psalm-param non-empty-string $message
192+
* @psalm-param non-empty-string $file
193+
* @psalm-param positive-int $line
194+
*/
171195
public function testTriggeredError(Code\Test $test, string $message, string $file, int $line, bool $suppressed): void;
172196

197+
/**
198+
* @psalm-param non-empty-string $message
199+
* @psalm-param non-empty-string $file
200+
* @psalm-param positive-int $line
201+
*/
173202
public function testTriggeredNotice(Code\Test $test, string $message, string $file, int $line, bool $suppressed, bool $ignoredByBaseline): void;
174203

204+
/**
205+
* @psalm-param non-empty-string $message
206+
* @psalm-param non-empty-string $file
207+
* @psalm-param positive-int $line
208+
*/
175209
public function testTriggeredPhpNotice(Code\Test $test, string $message, string $file, int $line, bool $suppressed, bool $ignoredByBaseline): void;
176210

211+
/**
212+
* @psalm-param non-empty-string $message
213+
* @psalm-param non-empty-string $file
214+
* @psalm-param positive-int $line
215+
*/
177216
public function testTriggeredWarning(Code\Test $test, string $message, string $file, int $line, bool $suppressed, bool $ignoredByBaseline): void;
178217

218+
/**
219+
* @psalm-param non-empty-string $message
220+
* @psalm-param non-empty-string $file
221+
* @psalm-param positive-int $line
222+
*/
179223
public function testTriggeredPhpWarning(Code\Test $test, string $message, string $file, int $line, bool $suppressed, bool $ignoredByBaseline): void;
180224

225+
/**
226+
* @psalm-param non-empty-string $message
227+
*/
181228
public function testTriggeredPhpunitError(Code\Test $test, string $message): void;
182229

230+
/**
231+
* @psalm-param non-empty-string $message
232+
*/
183233
public function testTriggeredPhpunitWarning(Code\Test $test, string $message): void;
184234

185235
/**

src/Event/Events/Test/Issue/PhpunitDeprecationTriggered.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,15 @@
2424
{
2525
private Telemetry\Info $telemetryInfo;
2626
private Test $test;
27+
28+
/**
29+
* @psalm-var non-empty-string
30+
*/
2731
private string $message;
2832

33+
/**
34+
* @psalm-param non-empty-string $message
35+
*/
2936
public function __construct(Telemetry\Info $telemetryInfo, Test $test, string $message)
3037
{
3138
$this->telemetryInfo = $telemetryInfo;
@@ -43,6 +50,9 @@ public function test(): Test
4350
return $this->test;
4451
}
4552

53+
/**
54+
* @psalm-return non-empty-string
55+
*/
4656
public function message(): string
4757
{
4858
return $this->message;

src/Event/Events/Test/Issue/PhpunitErrorTriggered.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,15 @@
2525
{
2626
private Telemetry\Info $telemetryInfo;
2727
private Test $test;
28+
29+
/**
30+
* @psalm-var non-empty-string
31+
*/
2832
private string $message;
2933

34+
/**
35+
* @psalm-param non-empty-string $message
36+
*/
3037
public function __construct(Telemetry\Info $telemetryInfo, Test $test, string $message)
3138
{
3239
$this->telemetryInfo = $telemetryInfo;
@@ -44,6 +51,9 @@ public function test(): Test
4451
return $this->test;
4552
}
4653

54+
/**
55+
* @psalm-return non-empty-string
56+
*/
4757
public function message(): string
4858
{
4959
return $this->message;

src/Event/Events/Test/Issue/PhpunitWarningTriggered.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,15 @@
2424
{
2525
private Telemetry\Info $telemetryInfo;
2626
private Test $test;
27+
28+
/**
29+
* @psalm-var non-empty-string
30+
*/
2731
private string $message;
2832

33+
/**
34+
* @psalm-param non-empty-string $message
35+
*/
2936
public function __construct(Telemetry\Info $telemetryInfo, Test $test, string $message)
3037
{
3138
$this->telemetryInfo = $telemetryInfo;
@@ -43,6 +50,9 @@ public function test(): Test
4350
return $this->test;
4451
}
4552

53+
/**
54+
* @psalm-return non-empty-string
55+
*/
4656
public function message(): string
4757
{
4858
return $this->message;

0 commit comments

Comments
 (0)