Skip to content

Commit 2c68106

Browse files
Merge branch '9.6' into 10.5
2 parents 3baeefe + e1ade1c commit 2c68106

File tree

17 files changed

+69
-69
lines changed

17 files changed

+69
-69
lines changed

.phive/phars.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phive xmlns="https://phar.io/phive">
33
<phar name="phpab" version="^1.29" installed="1.29.3" location="./tools/phpab" copy="true"/>
4-
<phar name="php-cs-fixer" version="^3.70" installed="3.76.0" location="./tools/php-cs-fixer" copy="true"/>
4+
<phar name="php-cs-fixer" version="^3.77" installed="3.77.0" location="./tools/php-cs-fixer" copy="true"/>
55
<phar name="psalm" version="^5.26" installed="5.26.1" location="./tools/psalm" copy="true"/>
66
<phar name="humbug/php-scoper" version="^0.18" installed="0.18.17" location="./tools/php-scoper" copy="true"/>
77
<phar name="composer" version="^2.8" installed="2.8.9" location="./tools/composer" copy="true"/>

src/Event/TypeMap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ public function isKnownEventType(Event $event): bool
6868
}
6969

7070
/**
71-
* @psalm-return class-string
72-
*
7371
* @throws MapError
72+
*
73+
* @psalm-return class-string
7474
*/
7575
public function map(Subscriber $subscriber): string
7676
{

src/Framework/Assert.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -969,12 +969,12 @@ final public static function assertObjectNotHasProperty(string $propertyName, ob
969969
* Used on objects, it asserts that two variables reference
970970
* the same object.
971971
*
972-
* @throws ExpectationFailedException
973-
*
974972
* @psalm-template ExpectedType
975973
*
976974
* @psalm-param ExpectedType $expected
977975
*
976+
* @throws ExpectationFailedException
977+
*
978978
* @psalm-assert =ExpectedType $actual
979979
*/
980980
final public static function assertSame(mixed $expected, mixed $actual, string $message = ''): void
@@ -1011,14 +1011,14 @@ final public static function assertNotSame(mixed $expected, mixed $actual, strin
10111011
/**
10121012
* Asserts that a variable is of a given type.
10131013
*
1014-
* @throws Exception
1015-
* @throws ExpectationFailedException
1016-
* @throws UnknownClassOrInterfaceException
1017-
*
10181014
* @psalm-template ExpectedType of object
10191015
*
10201016
* @psalm-param class-string<ExpectedType> $expected
10211017
*
1018+
* @throws Exception
1019+
* @throws ExpectationFailedException
1020+
* @throws UnknownClassOrInterfaceException
1021+
*
10221022
* @psalm-assert =ExpectedType $actual
10231023
*/
10241024
final public static function assertInstanceOf(string $expected, mixed $actual, string $message = ''): void
@@ -1037,13 +1037,13 @@ final public static function assertInstanceOf(string $expected, mixed $actual, s
10371037
/**
10381038
* Asserts that a variable is not of a given type.
10391039
*
1040-
* @throws Exception
1041-
* @throws ExpectationFailedException
1042-
*
10431040
* @psalm-template ExpectedType of object
10441041
*
10451042
* @psalm-param class-string<ExpectedType> $expected
10461043
*
1044+
* @throws Exception
1045+
* @throws ExpectationFailedException
1046+
*
10471047
* @psalm-assert !ExpectedType $actual
10481048
*/
10491049
final public static function assertNotInstanceOf(string $expected, mixed $actual, string $message = ''): void

src/Framework/Assert/Functions.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,12 +1164,12 @@ function assertObjectNotHasProperty(string $propertyName, object $object, string
11641164
* Used on objects, it asserts that two variables reference
11651165
* the same object.
11661166
*
1167-
* @throws ExpectationFailedException
1168-
*
11691167
* @psalm-template ExpectedType
11701168
*
11711169
* @psalm-param ExpectedType $expected
11721170
*
1171+
* @throws ExpectationFailedException
1172+
*
11731173
* @psalm-assert =ExpectedType $actual
11741174
*
11751175
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
@@ -1204,14 +1204,14 @@ function assertNotSame(mixed $expected, mixed $actual, string $message = ''): vo
12041204
/**
12051205
* Asserts that a variable is of a given type.
12061206
*
1207-
* @throws Exception
1208-
* @throws ExpectationFailedException
1209-
* @throws UnknownClassOrInterfaceException
1210-
*
12111207
* @psalm-template ExpectedType of object
12121208
*
12131209
* @psalm-param class-string<ExpectedType> $expected
12141210
*
1211+
* @throws Exception
1212+
* @throws ExpectationFailedException
1213+
* @throws UnknownClassOrInterfaceException
1214+
*
12151215
* @psalm-assert =ExpectedType $actual
12161216
*
12171217
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
@@ -1228,13 +1228,13 @@ function assertInstanceOf(string $expected, mixed $actual, string $message = '')
12281228
/**
12291229
* Asserts that a variable is not of a given type.
12301230
*
1231-
* @throws Exception
1232-
* @throws ExpectationFailedException
1233-
*
12341231
* @psalm-template ExpectedType of object
12351232
*
12361233
* @psalm-param class-string<ExpectedType> $expected
12371234
*
1235+
* @throws Exception
1236+
* @throws ExpectationFailedException
1237+
*
12381238
* @psalm-assert !ExpectedType $actual
12391239
*
12401240
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit

src/Framework/MockObject/Generator/Generator.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,9 +1035,9 @@ private function reflectClass(string $className): ReflectionClass
10351035
/**
10361036
* @psalm-param class-string $classOrInterfaceName
10371037
*
1038-
* @psalm-return list<string>
1039-
*
10401038
* @throws ReflectionException
1039+
*
1040+
* @psalm-return list<string>
10411041
*/
10421042
private function namesOfMethodsIn(string $classOrInterfaceName): array
10431043
{
@@ -1056,9 +1056,9 @@ private function namesOfMethodsIn(string $classOrInterfaceName): array
10561056
/**
10571057
* @psalm-param class-string $interfaceName
10581058
*
1059-
* @psalm-return list<MockMethod>
1060-
*
10611059
* @throws ReflectionException
1060+
*
1061+
* @psalm-return list<MockMethod>
10621062
*/
10631063
private function interfaceMethods(string $interfaceName, bool $cloneArguments): array
10641064
{

src/Framework/MockObject/MockBuilder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,12 @@ public function getMock(): MockObject
120120
/**
121121
* Creates a mock object for an abstract class using a fluent interface.
122122
*
123-
* @psalm-return MockObject&MockedType
124-
*
125123
* @throws Exception
126124
* @throws ReflectionException
127125
* @throws RuntimeException
128126
*
127+
* @psalm-return MockObject&MockedType
128+
*
129129
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/5305
130130
*/
131131
public function getMockForAbstractClass(): MockObject
@@ -151,12 +151,12 @@ public function getMockForAbstractClass(): MockObject
151151
/**
152152
* Creates a mock object for a trait using a fluent interface.
153153
*
154-
* @psalm-return MockObject&MockedType
155-
*
156154
* @throws Exception
157155
* @throws ReflectionException
158156
* @throws RuntimeException
159157
*
158+
* @psalm-return MockObject&MockedType
159+
*
160160
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/5306
161161
*/
162162
public function getMockForTrait(): MockObject

src/Framework/TestCase.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,11 +1244,11 @@ protected function setLocale(mixed ...$arguments): void
12441244
*
12451245
* @psalm-param class-string<RealInstanceType> $originalClassName
12461246
*
1247-
* @psalm-return MockObject&RealInstanceType
1248-
*
12491247
* @throws InvalidArgumentException
12501248
* @throws MockObjectException
12511249
* @throws NoPreviousThrowableException
1250+
*
1251+
* @psalm-return MockObject&RealInstanceType
12521252
*/
12531253
protected function createMock(string $originalClassName): MockObject
12541254
{
@@ -1296,11 +1296,11 @@ protected function createMockForIntersectionOfInterfaces(array $interfaces): Moc
12961296
*
12971297
* @psalm-param class-string<RealInstanceType> $originalClassName
12981298
*
1299-
* @psalm-return MockObject&RealInstanceType
1300-
*
13011299
* @throws InvalidArgumentException
13021300
* @throws MockObjectException
13031301
* @throws NoPreviousThrowableException
1302+
*
1303+
* @psalm-return MockObject&RealInstanceType
13041304
*/
13051305
protected function createConfiguredMock(string $originalClassName, array $configuration): MockObject
13061306
{
@@ -1322,10 +1322,10 @@ protected function createConfiguredMock(string $originalClassName, array $config
13221322
*
13231323
* @psalm-param class-string<RealInstanceType> $originalClassName
13241324
*
1325-
* @psalm-return MockObject&RealInstanceType
1326-
*
13271325
* @throws InvalidArgumentException
13281326
* @throws MockObjectException
1327+
*
1328+
* @psalm-return MockObject&RealInstanceType
13291329
*/
13301330
protected function createPartialMock(string $originalClassName, array $methods): MockObject
13311331
{
@@ -1352,11 +1352,11 @@ protected function createPartialMock(string $originalClassName, array $methods):
13521352
*
13531353
* @psalm-param class-string<RealInstanceType> $originalClassName
13541354
*
1355-
* @psalm-return MockObject&RealInstanceType
1356-
*
13571355
* @throws InvalidArgumentException
13581356
* @throws MockObjectException
13591357
*
1358+
* @psalm-return MockObject&RealInstanceType
1359+
*
13601360
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/5240
13611361
*/
13621362
protected function createTestProxy(string $originalClassName, array $constructorArguments = []): MockObject
@@ -1383,11 +1383,11 @@ protected function createTestProxy(string $originalClassName, array $constructor
13831383
*
13841384
* @psalm-param class-string<RealInstanceType> $originalClassName
13851385
*
1386-
* @psalm-return MockObject&RealInstanceType
1387-
*
13881386
* @throws InvalidArgumentException
13891387
* @throws MockObjectException
13901388
*
1389+
* @psalm-return MockObject&RealInstanceType
1390+
*
13911391
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/5241
13921392
*/
13931393
protected function getMockForAbstractClass(string $originalClassName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = [], bool $cloneArguments = false): MockObject
@@ -2347,11 +2347,11 @@ private function handleExceptionFromInvokedCountMockObjectRule(Throwable $t): vo
23472347
*
23482348
* @psalm-param class-string<RealInstanceType> $originalClassName
23492349
*
2350-
* @psalm-return Stub&RealInstanceType
2351-
*
23522350
* @throws InvalidArgumentException
23532351
* @throws MockObjectException
23542352
* @throws NoPreviousThrowableException
2353+
*
2354+
* @psalm-return Stub&RealInstanceType
23552355
*/
23562356
protected static function createStub(string $originalClassName): Stub
23572357
{
@@ -2393,11 +2393,11 @@ protected static function createStubForIntersectionOfInterfaces(array $interface
23932393
*
23942394
* @psalm-param class-string<RealInstanceType> $originalClassName
23952395
*
2396-
* @psalm-return Stub&RealInstanceType
2397-
*
23982396
* @throws InvalidArgumentException
23992397
* @throws MockObjectException
24002398
* @throws NoPreviousThrowableException
2399+
*
2400+
* @psalm-return Stub&RealInstanceType
24012401
*/
24022402
final protected static function createConfiguredStub(string $originalClassName, array $configuration): Stub
24032403
{

src/Metadata/Api/CodeCoverage.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ final class CodeCoverage
4848
* @psalm-param class-string $className
4949
* @psalm-param non-empty-string $methodName
5050
*
51-
* @psalm-return array<string,list<int>>|false
52-
*
5351
* @throws CodeCoverageException
52+
*
53+
* @psalm-return array<string,list<int>>|false
5454
*/
5555
public function linesToBeCovered(string $className, string $methodName): array|false
5656
{
@@ -130,9 +130,9 @@ public function linesToBeCovered(string $className, string $methodName): array|f
130130
* @psalm-param class-string $className
131131
* @psalm-param non-empty-string $methodName
132132
*
133-
* @psalm-return array<string,list<int>>
134-
*
135133
* @throws CodeCoverageException
134+
*
135+
* @psalm-return array<string,list<int>>
136136
*/
137137
public function linesToBeUsed(string $className, string $methodName): array
138138
{

src/Metadata/Parser/Annotation/DocBlock.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ private function __construct(string $docComment, array $symbolAnnotations, int $
114114
}
115115

116116
/**
117+
* @throws InvalidVersionRequirementException
118+
*
117119
* @psalm-return array{
118120
* __OFFSET: array<string, int>&array{__FILE: string},
119121
* setting?: array<string, string>,
@@ -122,8 +124,6 @@ private function __construct(string $docComment, array $symbolAnnotations, int $
122124
* string,
123125
* string|array{version: string, operator: string}|array{constraint: string}|array<int|string, string>
124126
* >
125-
*
126-
* @throws InvalidVersionRequirementException
127127
*/
128128
public function requirements(): array
129129
{

src/Metadata/Parser/AnnotationParser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,9 +440,9 @@ private function cleanUpCoversOrUsesTarget(string $value): string
440440
}
441441

442442
/**
443-
* @psalm-return list<Metadata>
444-
*
445443
* @throws InvalidVersionOperatorException
444+
*
445+
* @psalm-return list<Metadata>
446446
*/
447447
private function parseRequirements(array $requirements, string $level): array
448448
{

0 commit comments

Comments
 (0)