@@ -6,11 +6,11 @@ |
||
| 6 | 6 | |
| 7 | 7 | use Attribute; |
| 8 | 8 | |
| 9 | -#[Attribute(Attribute::TARGET_METHOD | Attribute::TARGET_CLASS)] |
|
| 9 | +#[Attribute(Attribute::TARGET_METHOD | Attribute::TARGET_CLASS) ] |
|
| 10 | 10 | final readonly class TimeOut |
| 11 | 11 | { |
| 12 | 12 | public function __construct( |
| 13 | - public int|float $timeout, |
|
| 13 | + public int | float $timeout, |
|
| 14 | 14 | ) { |
| 15 | 15 | } |
| 16 | 16 | } |
@@ -14,9 +14,9 @@ discard block |
||
| 14 | 14 | |
| 15 | 15 | abstract class AsyncTestCase extends TestCase |
| 16 | 16 | { |
| 17 | - private const INVOKE_ARRAY = ['__invoke']; |
|
| 17 | + private const INVOKE_ARRAY = [ '__invoke' ]; |
|
| 18 | 18 | |
| 19 | - private string|null $realTestName = null; |
|
| 19 | + private string | null $realTestName = null; |
|
| 20 | 20 | |
| 21 | 21 | /** @deprecated With the move to fibers there is no need for these rarely used methods anymore. (Unless proven otherwise of course.) */ |
| 22 | 22 | final protected function expectCallableExactly(int $amount): callable |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | $reflectionClass = new ReflectionClass($this::class); |
| 72 | 72 | foreach ($reflectionClass->getAttributes() as $classAttribute) { |
| 73 | 73 | $classTimeout = $classAttribute->newInstance(); |
| 74 | - if (! ($classTimeout instanceof TimeOut)) { |
|
| 74 | + if (!($classTimeout instanceof TimeOut)) { |
|
| 75 | 75 | continue; |
| 76 | 76 | } |
| 77 | 77 | |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | */ |
| 85 | 85 | foreach ($reflectionClass->getMethod($this->realTestName)->getAttributes() as $methodAttribute) { |
| 86 | 86 | $methodTimeout = $methodAttribute->newInstance(); |
| 87 | - if (! ($methodTimeout instanceof TimeOut)) { |
|
| 87 | + if (!($methodTimeout instanceof TimeOut)) { |
|
| 88 | 88 | continue; |
| 89 | 89 | } |
| 90 | 90 | |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | * @psalm-suppress UndefinedInterfaceMethod |
| 100 | 100 | */ |
| 101 | 101 | return await(async( |
| 102 | - fn (): mixed => ([$this, $this->realTestName])(...$args), |
|
| 102 | + fn (): mixed => ([ $this, $this->realTestName ])(...$args), |
|
| 103 | 103 | )()); |
| 104 | 104 | } finally { |
| 105 | 105 | Loop::cancelTimer($timeout); |