Skip to content

Commit e1ade1c

Browse files
Merge branch '8.5' into 9.6
2 parents 058d4d0 + ceb4845 commit e1ade1c

File tree

10 files changed

+49
-49
lines changed

10 files changed

+49
-49
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/Framework/Assert.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,13 +1389,13 @@ final public static function assertObjectNotHasProperty(string $propertyName, ob
13891389
* Used on objects, it asserts that two variables reference
13901390
* the same object.
13911391
*
1392-
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1393-
* @throws ExpectationFailedException
1394-
*
13951392
* @psalm-template ExpectedType
13961393
*
13971394
* @psalm-param ExpectedType $expected
13981395
*
1396+
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1397+
* @throws ExpectationFailedException
1398+
*
13991399
* @psalm-assert =ExpectedType $actual
14001400
*/
14011401
public static function assertSame($expected, $actual, string $message = ''): void
@@ -1433,14 +1433,14 @@ public static function assertNotSame($expected, $actual, string $message = ''):
14331433
/**
14341434
* Asserts that a variable is of a given type.
14351435
*
1436-
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1437-
* @throws Exception
1438-
* @throws ExpectationFailedException
1439-
*
14401436
* @psalm-template ExpectedType of object
14411437
*
14421438
* @psalm-param class-string<ExpectedType> $expected
14431439
*
1440+
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1441+
* @throws Exception
1442+
* @throws ExpectationFailedException
1443+
*
14441444
* @psalm-assert =ExpectedType $actual
14451445
*/
14461446
public static function assertInstanceOf(string $expected, $actual, string $message = ''): void
@@ -1459,14 +1459,14 @@ public static function assertInstanceOf(string $expected, $actual, string $messa
14591459
/**
14601460
* Asserts that a variable is not of a given type.
14611461
*
1462-
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1463-
* @throws Exception
1464-
* @throws ExpectationFailedException
1465-
*
14661462
* @psalm-template ExpectedType of object
14671463
*
14681464
* @psalm-param class-string<ExpectedType> $expected
14691465
*
1466+
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1467+
* @throws Exception
1468+
* @throws ExpectationFailedException
1469+
*
14701470
* @psalm-assert !ExpectedType $actual
14711471
*/
14721472
public static function assertNotInstanceOf(string $expected, $actual, string $message = ''): void

src/Framework/Assert/Functions.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,13 +1487,13 @@ function assertObjectNotHasProperty(string $attributeName, object $object, strin
14871487
* Used on objects, it asserts that two variables reference
14881488
* the same object.
14891489
*
1490-
* @throws ExpectationFailedException
1491-
* @throws InvalidArgumentException
1492-
*
14931490
* @psalm-template ExpectedType
14941491
*
14951492
* @psalm-param ExpectedType $expected
14961493
*
1494+
* @throws ExpectationFailedException
1495+
* @throws InvalidArgumentException
1496+
*
14971497
* @psalm-assert =ExpectedType $actual
14981498
*
14991499
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
@@ -1529,14 +1529,14 @@ function assertNotSame($expected, $actual, string $message = ''): void
15291529
/**
15301530
* Asserts that a variable is of a given type.
15311531
*
1532-
* @throws ExpectationFailedException
1533-
* @throws InvalidArgumentException
1534-
* @throws Exception
1535-
*
15361532
* @psalm-template ExpectedType of object
15371533
*
15381534
* @psalm-param class-string<ExpectedType> $expected
15391535
*
1536+
* @throws ExpectationFailedException
1537+
* @throws InvalidArgumentException
1538+
* @throws Exception
1539+
*
15401540
* @psalm-assert =ExpectedType $actual
15411541
*
15421542
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
@@ -1553,14 +1553,14 @@ function assertInstanceOf(string $expected, $actual, string $message = ''): void
15531553
/**
15541554
* Asserts that a variable is not of a given type.
15551555
*
1556-
* @throws ExpectationFailedException
1557-
* @throws InvalidArgumentException
1558-
* @throws Exception
1559-
*
15601556
* @psalm-template ExpectedType of object
15611557
*
15621558
* @psalm-param class-string<ExpectedType> $expected
15631559
*
1560+
* @throws ExpectationFailedException
1561+
* @throws InvalidArgumentException
1562+
* @throws Exception
1563+
*
15641564
* @psalm-assert !ExpectedType $actual
15651565
*
15661566
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit

src/Framework/MockObject/Generator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,6 @@ public function getMockForInterfaces(array $interfaces, bool $callAutoload = tru
293293
*
294294
* @psalm-param class-string<RealInstanceType> $originalClassName
295295
*
296-
* @psalm-return MockObject&RealInstanceType
297-
*
298296
* @throws ClassAlreadyExistsException
299297
* @throws ClassIsFinalException
300298
* @throws ClassIsReadonlyException
@@ -306,6 +304,8 @@ public function getMockForInterfaces(array $interfaces, bool $callAutoload = tru
306304
* @throws RuntimeException
307305
* @throws UnknownClassException
308306
* @throws UnknownTypeException
307+
*
308+
* @psalm-return MockObject&RealInstanceType
309309
*/
310310
public function getMockForAbstractClass(string $originalClassName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, ?array $mockedMethods = null, bool $cloneArguments = true): MockObject
311311
{

src/Framework/MockObject/MockBuilder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,11 @@ public function getMock(): MockObject
151151
/**
152152
* Creates a mock object for an abstract class using a fluent interface.
153153
*
154-
* @psalm-return MockObject&MockedType
155-
*
156154
* @throws Exception
157155
* @throws ReflectionException
158156
* @throws RuntimeException
157+
*
158+
* @psalm-return MockObject&MockedType
159159
*/
160160
public function getMockForAbstractClass(): MockObject
161161
{
@@ -178,11 +178,11 @@ public function getMockForAbstractClass(): MockObject
178178
/**
179179
* Creates a mock object for a trait using a fluent interface.
180180
*
181-
* @psalm-return MockObject&MockedType
182-
*
183181
* @throws Exception
184182
* @throws ReflectionException
185183
* @throws RuntimeException
184+
*
185+
* @psalm-return MockObject&MockedType
186186
*/
187187
public function getMockForTrait(): MockObject
188188
{

src/Framework/TestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2038,12 +2038,12 @@ protected function getObjectForTrait(string $traitName, array $arguments = [], s
20382038
}
20392039

20402040
/**
2041+
* @psalm-param class-string|null $classOrInterface
2042+
*
20412043
* @throws ClassNotFoundException
20422044
* @throws DoubleException
20432045
* @throws InterfaceNotFoundException
20442046
*
2045-
* @psalm-param class-string|null $classOrInterface
2046-
*
20472047
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/4141
20482048
*/
20492049
protected function prophesize(?string $classOrInterface = null): ObjectProphecy

src/Util/Annotation/DocBlock.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ private function __construct(string $docComment, bool $isMethod, array $symbolAn
169169
}
170170

171171
/**
172+
* @throws Warning if the requirements version constraint is not well-formed
173+
*
172174
* @psalm-return array{
173175
* __OFFSET: array<string, int>&array{__FILE: string},
174176
* setting?: array<string, string>,
@@ -177,8 +179,6 @@ private function __construct(string $docComment, bool $isMethod, array $symbolAn
177179
* string,
178180
* string|array{version: string, operator: string}|array{constraint: string}|array<int|string, string>
179181
* >
180-
*
181-
* @throws Warning if the requirements version constraint is not well-formed
182182
*/
183183
public function requirements(): array
184184
{

src/Util/Annotation/Registry.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ private function __construct()
4242
}
4343

4444
/**
45-
* @throws Exception
46-
*
4745
* @psalm-param class-string $class
46+
*
47+
* @throws Exception
4848
*/
4949
public function forClassName(string $class): DocBlock
5050
{
@@ -68,9 +68,9 @@ public function forClassName(string $class): DocBlock
6868
}
6969

7070
/**
71-
* @throws Exception
72-
*
7371
* @psalm-param class-string $classInHierarchy
72+
*
73+
* @throws Exception
7474
*/
7575
public function forMethod(string $classInHierarchy, string $method): DocBlock
7676
{

src/Util/Test.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ public static function describeAsString(\PHPUnit\Framework\Test $test): string
110110
}
111111

112112
/**
113+
* @psalm-param class-string $className
114+
*
113115
* @throws CodeCoverageException
114116
*
115117
* @return array|bool
116-
*
117-
* @psalm-param class-string $className
118118
*/
119119
public static function getLinesToBeCovered(string $className, string $methodName)
120120
{
@@ -133,9 +133,9 @@ public static function getLinesToBeCovered(string $className, string $methodName
133133
/**
134134
* Returns lines of code specified with the @uses annotation.
135135
*
136-
* @throws CodeCoverageException
137-
*
138136
* @psalm-param class-string $className
137+
*
138+
* @throws CodeCoverageException
139139
*/
140140
public static function getLinesToBeUsed(string $className, string $methodName): array
141141
{
@@ -175,9 +175,9 @@ public static function requiresCodeCoverageDataCollection(TestCase $test): bool
175175
}
176176

177177
/**
178-
* @throws Exception
179-
*
180178
* @psalm-param class-string $className
179+
*
180+
* @throws Exception
181181
*/
182182
public static function getRequirements(string $className, string $methodName): array
183183
{
@@ -190,10 +190,10 @@ public static function getRequirements(string $className, string $methodName): a
190190
/**
191191
* Returns the missing requirements for a test.
192192
*
193+
* @psalm-param class-string $className
194+
*
193195
* @throws Exception
194196
* @throws Warning
195-
*
196-
* @psalm-param class-string $className
197197
*/
198198
public static function getMissingRequirements(string $className, string $methodName): array
199199
{
@@ -320,9 +320,9 @@ public static function getMissingRequirements(string $className, string $methodN
320320
/**
321321
* Returns the provided data for a method.
322322
*
323-
* @throws Exception
324-
*
325323
* @psalm-param class-string $className
324+
*
325+
* @throws Exception
326326
*/
327327
public static function getProvidedData(string $className, string $methodName): ?array
328328
{
@@ -597,9 +597,9 @@ public static function isTestMethod(ReflectionMethod $method): bool
597597
}
598598

599599
/**
600-
* @throws CodeCoverageException
601-
*
602600
* @psalm-param class-string $className
601+
*
602+
* @throws CodeCoverageException
603603
*/
604604
private static function getLinesToBeCoveredOrUsed(string $className, string $methodName, string $mode): array
605605
{

tools/php-cs-fixer

1.44 KB
Binary file not shown.

0 commit comments

Comments
 (0)