Skip to content

Commit ceb4845

Browse files
Fix CS/WS issues
1 parent 42b5b1a commit ceb4845

File tree

7 files changed

+62
-62
lines changed

7 files changed

+62
-62
lines changed

src/Framework/Assert.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1833,13 +1833,13 @@ public static function assertObjectNotHasAttribute(string $attributeName, $objec
18331833
* Used on objects, it asserts that two variables reference
18341834
* the same object.
18351835
*
1836-
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1837-
* @throws ExpectationFailedException
1838-
*
18391836
* @psalm-template ExpectedType
18401837
*
18411838
* @psalm-param ExpectedType $expected
18421839
*
1840+
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1841+
* @throws ExpectationFailedException
1842+
*
18431843
* @psalm-assert =ExpectedType $actual
18441844
*/
18451845
public static function assertSame($expected, $actual, string $message = ''): void
@@ -1927,14 +1927,14 @@ public static function assertAttributeNotSame($expected, string $actualAttribute
19271927
/**
19281928
* Asserts that a variable is of a given type.
19291929
*
1930-
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1931-
* @throws Exception
1932-
* @throws ExpectationFailedException
1933-
*
19341930
* @psalm-template ExpectedType of object
19351931
*
19361932
* @psalm-param class-string<ExpectedType> $expected
19371933
*
1934+
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1935+
* @throws Exception
1936+
* @throws ExpectationFailedException
1937+
*
19381938
* @psalm-assert =ExpectedType $actual
19391939
*/
19401940
public static function assertInstanceOf(string $expected, $actual, string $message = ''): void
@@ -1955,15 +1955,15 @@ public static function assertInstanceOf(string $expected, $actual, string $messa
19551955
*
19561956
* @param object|string $classOrObject
19571957
*
1958-
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1959-
* @throws Exception
1960-
* @throws ExpectationFailedException
1961-
*
19621958
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338
19631959
*
19641960
* @codeCoverageIgnore
19651961
*
19661962
* @psalm-param class-string $expected
1963+
*
1964+
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1965+
* @throws Exception
1966+
* @throws ExpectationFailedException
19671967
*/
19681968
public static function assertAttributeInstanceOf(string $expected, string $attributeName, $classOrObject, string $message = ''): void
19691969
{
@@ -1979,14 +1979,14 @@ public static function assertAttributeInstanceOf(string $expected, string $attri
19791979
/**
19801980
* Asserts that a variable is not of a given type.
19811981
*
1982-
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1983-
* @throws Exception
1984-
* @throws ExpectationFailedException
1985-
*
19861982
* @psalm-template ExpectedType of object
19871983
*
19881984
* @psalm-param class-string<ExpectedType> $expected
19891985
*
1986+
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1987+
* @throws Exception
1988+
* @throws ExpectationFailedException
1989+
*
19901990
* @psalm-assert !ExpectedType $actual
19911991
*/
19921992
public static function assertNotInstanceOf(string $expected, $actual, string $message = ''): void
@@ -2009,15 +2009,15 @@ public static function assertNotInstanceOf(string $expected, $actual, string $me
20092009
*
20102010
* @param object|string $classOrObject
20112011
*
2012-
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2013-
* @throws Exception
2014-
* @throws ExpectationFailedException
2015-
*
20162012
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338
20172013
*
20182014
* @codeCoverageIgnore
20192015
*
20202016
* @psalm-param class-string $expected
2017+
*
2018+
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2019+
* @throws Exception
2020+
* @throws ExpectationFailedException
20212021
*/
20222022
public static function assertAttributeNotInstanceOf(string $expected, string $attributeName, $classOrObject, string $message = ''): void
20232023
{

src/Framework/Assert/Functions.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,13 +1473,13 @@ function assertObjectNotHasAttribute(string $attributeName, $object, string $mes
14731473
* Used on objects, it asserts that two variables reference
14741474
* the same object.
14751475
*
1476-
* @throws InvalidArgumentException
1477-
* @throws ExpectationFailedException
1478-
*
14791476
* @psalm-template ExpectedType
14801477
*
14811478
* @psalm-param ExpectedType $expected
14821479
*
1480+
* @throws InvalidArgumentException
1481+
* @throws ExpectationFailedException
1482+
*
14831483
* @psalm-assert =ExpectedType $actual
14841484
*
14851485
* @see Assert::assertSame
@@ -1557,14 +1557,14 @@ function assertAttributeNotSame($expected, string $actualAttributeName, $actualC
15571557
/**
15581558
* Asserts that a variable is of a given type.
15591559
*
1560-
* @throws InvalidArgumentException
1561-
* @throws Exception
1562-
* @throws ExpectationFailedException
1563-
*
15641560
* @psalm-template ExpectedType of object
15651561
*
15661562
* @psalm-param class-string<ExpectedType> $expected
15671563
*
1564+
* @throws InvalidArgumentException
1565+
* @throws Exception
1566+
* @throws ExpectationFailedException
1567+
*
15681568
* @psalm-assert =ExpectedType $actual
15691569
*
15701570
* @see Assert::assertInstanceOf
@@ -1581,16 +1581,16 @@ function assertInstanceOf(string $expected, $actual, string $message = ''): void
15811581
*
15821582
* @param object|string $classOrObject
15831583
*
1584-
* @throws InvalidArgumentException
1585-
* @throws Exception
1586-
* @throws ExpectationFailedException
1587-
*
15881584
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338
15891585
*
15901586
* @codeCoverageIgnore
15911587
*
15921588
* @psalm-param class-string $expected
15931589
*
1590+
* @throws InvalidArgumentException
1591+
* @throws Exception
1592+
* @throws ExpectationFailedException
1593+
*
15941594
* @see Assert::assertAttributeInstanceOf
15951595
*/
15961596
function assertAttributeInstanceOf(string $expected, string $attributeName, $classOrObject, string $message = ''): void
@@ -1603,14 +1603,14 @@ function assertAttributeInstanceOf(string $expected, string $attributeName, $cla
16031603
/**
16041604
* Asserts that a variable is not of a given type.
16051605
*
1606-
* @throws InvalidArgumentException
1607-
* @throws Exception
1608-
* @throws ExpectationFailedException
1609-
*
16101606
* @psalm-template ExpectedType of object
16111607
*
16121608
* @psalm-param class-string<ExpectedType> $expected
16131609
*
1610+
* @throws InvalidArgumentException
1611+
* @throws Exception
1612+
* @throws ExpectationFailedException
1613+
*
16141614
* @psalm-assert !ExpectedType $actual
16151615
*
16161616
* @see Assert::assertNotInstanceOf
@@ -1627,16 +1627,16 @@ function assertNotInstanceOf(string $expected, $actual, string $message = ''): v
16271627
*
16281628
* @param object|string $classOrObject
16291629
*
1630-
* @throws InvalidArgumentException
1631-
* @throws Exception
1632-
* @throws ExpectationFailedException
1633-
*
16341630
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338
16351631
*
16361632
* @codeCoverageIgnore
16371633
*
16381634
* @psalm-param class-string $expected
16391635
*
1636+
* @throws InvalidArgumentException
1637+
* @throws Exception
1638+
* @throws ExpectationFailedException
1639+
*
16401640
* @see Assert::assertAttributeNotInstanceOf
16411641
*/
16421642
function assertAttributeNotInstanceOf(string $expected, string $attributeName, $classOrObject, string $message = ''): void

src/Framework/MockObject/Generator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,9 @@ static function ($type)
284284
*
285285
* @psalm-param class-string<RealInstanceType> $originalClassName
286286
*
287-
* @psalm-return MockObject&RealInstanceType
288-
*
289287
* @throws RuntimeException
288+
*
289+
* @psalm-return MockObject&RealInstanceType
290290
*/
291291
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
292292
{

src/Framework/TestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1975,11 +1975,11 @@ protected function getObjectForTrait($traitName, array $arguments = [], $traitCl
19751975
/**
19761976
* @param ?string $classOrInterface
19771977
*
1978+
* @psalm-param class-string|null $classOrInterface
1979+
*
19781980
* @throws ClassNotFoundException
19791981
* @throws DoubleException
19801982
* @throws InterfaceNotFoundException
1981-
*
1982-
* @psalm-param class-string|null $classOrInterface
19831983
*/
19841984
protected function prophesize($classOrInterface = null): ObjectProphecy
19851985
{

src/Util/Annotation/DocBlock.php

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

177177
/**
178+
* @throws Warning if the requirements version constraint is not well-formed
179+
*
178180
* @psalm-return array{
179181
* __OFFSET: array<string, int>&array{__FILE: string},
180182
* setting?: array<string, string>,
@@ -183,8 +185,6 @@ private function __construct(string $docComment, bool $isMethod, array $symbolAn
183185
* string,
184186
* string|array{version: string, operator: string}|array{constraint: string}|array<int|string, string>
185187
* >
186-
*
187-
* @throws Warning if the requirements version constraint is not well-formed
188188
*/
189189
public function requirements(): array
190190
{

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: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ public static function describeAsString(\PHPUnit\Framework\Test $test): string
111111
}
112112

113113
/**
114+
* @psalm-param class-string $className
115+
*
114116
* @throws CodeCoverageException
115117
*
116118
* @return array|bool
117-
*
118-
* @psalm-param class-string $className
119119
*/
120120
public static function getLinesToBeCovered(string $className, string $methodName)
121121
{
@@ -134,9 +134,9 @@ public static function getLinesToBeCovered(string $className, string $methodName
134134
/**
135135
* Returns lines of code specified with the @uses annotation.
136136
*
137-
* @throws CodeCoverageException
138-
*
139137
* @psalm-param class-string $className
138+
*
139+
* @throws CodeCoverageException
140140
*/
141141
public static function getLinesToBeUsed(string $className, string $methodName): array
142142
{
@@ -171,9 +171,9 @@ public static function requiresCodeCoverageDataCollection(TestCase $test): bool
171171
}
172172

173173
/**
174-
* @throws Exception
175-
*
176174
* @psalm-param class-string $className
175+
*
176+
* @throws Exception
177177
*/
178178
public static function getRequirements(string $className, string $methodName): array
179179
{
@@ -186,10 +186,10 @@ public static function getRequirements(string $className, string $methodName): a
186186
/**
187187
* Returns the missing requirements for a test.
188188
*
189+
* @psalm-param class-string $className
190+
*
189191
* @throws Exception
190192
* @throws Warning
191-
*
192-
* @psalm-param class-string $className
193193
*/
194194
public static function getMissingRequirements(string $className, string $methodName): array
195195
{
@@ -316,13 +316,13 @@ public static function getMissingRequirements(string $className, string $methodN
316316
/**
317317
* Returns the expected exception for a test.
318318
*
319-
* @return array|false
320-
*
321319
* @deprecated
322320
*
323321
* @codeCoverageIgnore
324322
*
325323
* @psalm-param class-string $className
324+
*
325+
* @return array|false
326326
*/
327327
public static function getExpectedException(string $className, string $methodName)
328328
{
@@ -332,9 +332,9 @@ public static function getExpectedException(string $className, string $methodNam
332332
/**
333333
* Returns the provided data for a method.
334334
*
335-
* @throws Exception
336-
*
337335
* @psalm-param class-string $className
336+
*
337+
* @throws Exception
338338
*/
339339
public static function getProvidedData(string $className, string $methodName): ?array
340340
{
@@ -573,9 +573,9 @@ public static function isTestMethod(ReflectionMethod $method): bool
573573
}
574574

575575
/**
576-
* @throws CodeCoverageException
577-
*
578576
* @psalm-param class-string $className
577+
*
578+
* @throws CodeCoverageException
579579
*/
580580
private static function getLinesToBeCoveredOrUsed(string $className, string $methodName, string $mode): array
581581
{

0 commit comments

Comments
 (0)