Skip to content

Commit 3822cd4

Browse files
Fix CS/WS issues
1 parent d25bfbe commit 3822cd4

File tree

77 files changed

+541
-333
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

+541
-333
lines changed

src/Framework/Assert/Functions.php

Lines changed: 147 additions & 146 deletions
Large diffs are not rendered by default.

src/Framework/Constraint/ArrayHasKey.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use function array_key_exists;
1313
use function is_array;
1414
use ArrayAccess;
15+
use SebastianBergmann\RecursionContext\InvalidArgumentException;
1516

1617
/**
1718
* Constraint that asserts that the array it is evaluated for has a given key.
@@ -39,7 +40,7 @@ public function __construct($key)
3940
/**
4041
* Returns a string representation of the constraint.
4142
*
42-
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
43+
* @throws InvalidArgumentException
4344
*/
4445
public function toString(): string
4546
{
@@ -73,7 +74,7 @@ protected function matches($other): bool
7374
*
7475
* @param mixed $other evaluated value or object
7576
*
76-
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
77+
* @throws InvalidArgumentException
7778
*/
7879
protected function failureDescription($other): string
7980
{

src/Framework/Constraint/ArraySubset.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use ArrayObject;
1717
use PHPUnit\Framework\ExpectationFailedException;
1818
use SebastianBergmann\Comparator\ComparisonFailure;
19+
use SebastianBergmann\RecursionContext\InvalidArgumentException;
1920
use Traversable;
2021

2122
/**
@@ -56,8 +57,8 @@ public function __construct(iterable $subset, bool $strict = false)
5657
* a boolean value instead: true in case of success, false in case of a
5758
* failure.
5859
*
59-
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
6060
* @throws ExpectationFailedException
61+
* @throws InvalidArgumentException
6162
*/
6263
public function evaluate($other, string $description = '', bool $returnResult = false)
6364
{
@@ -93,7 +94,7 @@ public function evaluate($other, string $description = '', bool $returnResult =
9394
/**
9495
* Returns a string representation of the constraint.
9596
*
96-
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
97+
* @throws InvalidArgumentException
9798
*/
9899
public function toString(): string
99100
{
@@ -108,7 +109,7 @@ public function toString(): string
108109
*
109110
* @param mixed $other evaluated value or object
110111
*
111-
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
112+
* @throws InvalidArgumentException
112113
*/
113114
protected function failureDescription($other): string
114115
{

src/Framework/Constraint/Attribute.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
namespace PHPUnit\Framework\Constraint;
1111

1212
use PHPUnit\Framework\Assert;
13+
use PHPUnit\Framework\Exception;
1314
use PHPUnit\Framework\ExpectationFailedException;
15+
use SebastianBergmann\RecursionContext\InvalidArgumentException;
1416

1517
/**
1618
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338
@@ -41,9 +43,9 @@ public function __construct(Constraint $constraint, string $attributeName)
4143
* a boolean value instead: true in case of success, false in case of a
4244
* failure.
4345
*
44-
* @throws \PHPUnit\Framework\Exception
45-
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
46+
* @throws Exception
4647
* @throws ExpectationFailedException
48+
* @throws InvalidArgumentException
4749
*/
4850
public function evaluate($other, string $description = '', bool $returnResult = false)
4951
{

src/Framework/Constraint/Composite.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
use function count;
1313
use PHPUnit\Framework\ExpectationFailedException;
14+
use SebastianBergmann\RecursionContext\InvalidArgumentException;
1415

1516
/**
1617
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338
@@ -39,8 +40,8 @@ public function __construct(Constraint $innerConstraint)
3940
* a boolean value instead: true in case of success, false in case of a
4041
* failure.
4142
*
42-
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
4343
* @throws ExpectationFailedException
44+
* @throws InvalidArgumentException
4445
*/
4546
public function evaluate($other, string $description = '', bool $returnResult = false)
4647
{

src/Framework/Constraint/Constraint.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use PHPUnit\Framework\SelfDescribing;
1616
use SebastianBergmann\Comparator\ComparisonFailure;
1717
use SebastianBergmann\Exporter\Exporter;
18+
use SebastianBergmann\RecursionContext\InvalidArgumentException;
1819

1920
/**
2021
* Abstract base class for constraints which can be applied to any value.
@@ -36,8 +37,8 @@ abstract class Constraint implements Countable, SelfDescribing
3637
* a boolean value instead: true in case of success, false in case of a
3738
* failure.
3839
*
39-
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
4040
* @throws ExpectationFailedException
41+
* @throws InvalidArgumentException
4142
*/
4243
public function evaluate($other, string $description = '', bool $returnResult = false)
4344
{
@@ -94,8 +95,8 @@ protected function matches($other): bool
9495
* @param mixed $other evaluated value or object
9596
* @param string $description Additional information about the test
9697
*
97-
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
9898
* @throws ExpectationFailedException
99+
* @throws InvalidArgumentException
99100
*
100101
* @psalm-return never-return
101102
*/
@@ -146,7 +147,7 @@ protected function additionalFailureDescription($other): string
146147
*
147148
* @param mixed $other evaluated value or object
148149
*
149-
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
150+
* @throws InvalidArgumentException
150151
*/
151152
protected function failureDescription($other): string
152153
{

src/Framework/Constraint/ExceptionCode.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
namespace PHPUnit\Framework\Constraint;
1111

1212
use function sprintf;
13+
use SebastianBergmann\RecursionContext\InvalidArgumentException;
1314
use Throwable;
1415

1516
final class ExceptionCode extends Constraint
@@ -51,7 +52,7 @@ protected function matches($other): bool
5152
*
5253
* @param mixed $other evaluated value or object
5354
*
54-
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
55+
* @throws InvalidArgumentException
5556
*/
5657
protected function failureDescription($other): string
5758
{

src/Framework/Constraint/GreaterThan.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
*/
1010
namespace PHPUnit\Framework\Constraint;
1111

12+
use SebastianBergmann\RecursionContext\InvalidArgumentException;
13+
1214
/**
1315
* Constraint that asserts that the value it is evaluated for is greater
1416
* than a given value.
@@ -31,7 +33,7 @@ public function __construct($value)
3133
/**
3234
* Returns a string representation of the constraint.
3335
*
34-
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
36+
* @throws InvalidArgumentException
3537
*/
3638
public function toString(): string
3739
{

src/Framework/Constraint/IsEqual.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use PHPUnit\Framework\ExpectationFailedException;
1717
use SebastianBergmann\Comparator\ComparisonFailure;
1818
use SebastianBergmann\Comparator\Factory as ComparatorFactory;
19+
use SebastianBergmann\RecursionContext\InvalidArgumentException;
1920

2021
/**
2122
* Constraint that checks if one value is equal to another.
@@ -109,7 +110,7 @@ public function evaluate($other, string $description = '', bool $returnResult =
109110
/**
110111
* Returns a string representation of the constraint.
111112
*
112-
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
113+
* @throws InvalidArgumentException
113114
*/
114115
public function toString(): string
115116
{

src/Framework/Constraint/IsIdentical.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use function sprintf;
1717
use PHPUnit\Framework\ExpectationFailedException;
1818
use SebastianBergmann\Comparator\ComparisonFailure;
19+
use SebastianBergmann\RecursionContext\InvalidArgumentException;
1920

2021
/**
2122
* Constraint that asserts that one value is identical to another.
@@ -50,8 +51,8 @@ public function __construct($value)
5051
* a boolean value instead: true in case of success, false in case of a
5152
* failure.
5253
*
53-
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
5454
* @throws ExpectationFailedException
55+
* @throws InvalidArgumentException
5556
*/
5657
public function evaluate($other, string $description = '', bool $returnResult = false)
5758
{
@@ -91,7 +92,7 @@ public function evaluate($other, string $description = '', bool $returnResult =
9192
/**
9293
* Returns a string representation of the constraint.
9394
*
94-
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
95+
* @throws InvalidArgumentException
9596
*/
9697
public function toString(): string
9798
{
@@ -111,7 +112,7 @@ public function toString(): string
111112
*
112113
* @param mixed $other evaluated value or object
113114
*
114-
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
115+
* @throws InvalidArgumentException
115116
*/
116117
protected function failureDescription($other): string
117118
{

0 commit comments

Comments
 (0)