diff --git a/composer.json b/composer.json index da68f438..6fd435a2 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "nunomaduro/termwind": "^2.0.1", "pestphp/pest-plugin": "^3.0.0", "pestphp/pest-plugin-arch": "^3.0.0", - "phpunit/phpunit": "^11.2.2" + "phpunit/phpunit": "^11.2.5" }, "conflict": { "sebastian/exporter": "<6.0.0", diff --git a/src/Bootstrappers/BootSubscribers.php b/src/Bootstrappers/BootSubscribers.php index 248b9dde..0be2a488 100644 --- a/src/Bootstrappers/BootSubscribers.php +++ b/src/Bootstrappers/BootSubscribers.php @@ -32,8 +32,7 @@ final class BootSubscribers implements Bootstrapper */ public function __construct( private readonly Container $container, - ) { - } + ) {} /** * Boots the list of Subscribers. diff --git a/src/Configuration.php b/src/Configuration.php index 1eea83b7..f4c291fc 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -32,8 +32,7 @@ final class Configuration */ private function __construct( private readonly string $filename, - ) { - } + ) {} /** * Gets the configuration of a certain folder. diff --git a/src/Contracts/ArchPreset.php b/src/Contracts/ArchPreset.php index 6f5a0fca..0a53006a 100644 --- a/src/Contracts/ArchPreset.php +++ b/src/Contracts/ArchPreset.php @@ -7,6 +7,4 @@ namespace Pest\Contracts; /** * @internal */ -interface ArchPreset -{ -} +interface ArchPreset {} diff --git a/src/Expectations/EachExpectation.php b/src/Expectations/EachExpectation.php index e5df6e9c..bbca0592 100644 --- a/src/Expectations/EachExpectation.php +++ b/src/Expectations/EachExpectation.php @@ -24,9 +24,7 @@ final class EachExpectation * * @param Expectation $original */ - public function __construct(private readonly Expectation $original) - { - } + public function __construct(private readonly Expectation $original) {} /** * Creates a new expectation. diff --git a/src/Expectations/OppositeExpectation.php b/src/Expectations/OppositeExpectation.php index 57796f83..902419b2 100644 --- a/src/Expectations/OppositeExpectation.php +++ b/src/Expectations/OppositeExpectation.php @@ -36,9 +36,7 @@ final class OppositeExpectation * * @param Expectation $original */ - public function __construct(private readonly Expectation $original) - { - } + public function __construct(private readonly Expectation $original) {} /** * Asserts that the value array not has the provided $keys. diff --git a/src/Functions.php b/src/Functions.php index 3f358bbc..2ce48fba 100644 --- a/src/Functions.php +++ b/src/Functions.php @@ -55,6 +55,7 @@ if (! function_exists('beforeEach')) { * Runs the given closure before each test in the current file. * * @param-closure-this TestCase $closure + * * @return HigherOrderTapProxy|Expectable|TestCall|TestCase|mixed */ function beforeEach(?Closure $closure = null): BeforeEachCall @@ -127,6 +128,7 @@ if (! function_exists('test')) { * a closure that contains the test expectations. * * @param-closure-this TestCase $closure + * * @return Expectable|TestCall|TestCase|mixed */ function test(?string $description = null, ?Closure $closure = null): HigherOrderTapProxy|TestCall @@ -148,6 +150,7 @@ if (! function_exists('it')) { * a closure that contains the test expectations. * * @param-closure-this TestCase $closure + * * @return Expectable|TestCall|TestCase|mixed */ function it(string $description, ?Closure $closure = null): TestCall @@ -184,6 +187,7 @@ if (! function_exists('afterEach')) { * Runs the given closure after each test in the current file. * * @param-closure-this TestCase $closure + * * @return Expectable|HigherOrderTapProxy|TestCall|mixed */ function afterEach(?Closure $closure = null): AfterEachCall diff --git a/src/Logging/TeamCity/ServiceMessage.php b/src/Logging/TeamCity/ServiceMessage.php index ca16dd80..0fbbaccb 100644 --- a/src/Logging/TeamCity/ServiceMessage.php +++ b/src/Logging/TeamCity/ServiceMessage.php @@ -17,8 +17,7 @@ final class ServiceMessage public function __construct( private readonly string $type, private readonly array $parameters, - ) { - } + ) {} public function toString(): string { diff --git a/src/Logging/TeamCity/Subscriber/Subscriber.php b/src/Logging/TeamCity/Subscriber/Subscriber.php index cc14cfa0..031e3714 100644 --- a/src/Logging/TeamCity/Subscriber/Subscriber.php +++ b/src/Logging/TeamCity/Subscriber/Subscriber.php @@ -14,9 +14,7 @@ abstract class Subscriber /** * Creates a new Subscriber instance. */ - public function __construct(private readonly TeamCityLogger $logger) - { - } + public function __construct(private readonly TeamCityLogger $logger) {} /** * Creates a new TeamCityLogger instance. diff --git a/src/Matchers/Any.php b/src/Matchers/Any.php index 484cf795..576039e0 100644 --- a/src/Matchers/Any.php +++ b/src/Matchers/Any.php @@ -7,6 +7,4 @@ namespace Pest\Matchers; /** * @internal */ -final class Any -{ -} +final class Any {} diff --git a/src/Plugins/Parallel/Paratest/ResultPrinter.php b/src/Plugins/Parallel/Paratest/ResultPrinter.php index 1e9cc245..16a211f2 100644 --- a/src/Plugins/Parallel/Paratest/ResultPrinter.php +++ b/src/Plugins/Parallel/Paratest/ResultPrinter.php @@ -63,8 +63,7 @@ final class ResultPrinter { public function __construct( private readonly OutputInterface $output, - ) { - } + ) {} public function print(string $buffer): void { @@ -79,9 +78,7 @@ final class ResultPrinter $this->output->write(OutputFormatter::escape($buffer)); } - public function flush(): void - { - } + public function flush(): void {} }; $this->compactPrinter = CompactPrinter::default(); diff --git a/src/Repositories/SnapshotRepository.php b/src/Repositories/SnapshotRepository.php index 1cd3e666..171fd88f 100644 --- a/src/Repositories/SnapshotRepository.php +++ b/src/Repositories/SnapshotRepository.php @@ -21,8 +21,7 @@ final class SnapshotRepository public function __construct( readonly private string $testsPath, readonly private string $snapshotsPath, - ) { - } + ) {} /** * Checks if the snapshot exists. diff --git a/src/Subscribers/EnsureTeamCityEnabled.php b/src/Subscribers/EnsureTeamCityEnabled.php index 264800c0..89d4be97 100644 --- a/src/Subscribers/EnsureTeamCityEnabled.php +++ b/src/Subscribers/EnsureTeamCityEnabled.php @@ -24,8 +24,7 @@ final class EnsureTeamCityEnabled implements ConfiguredSubscriber private readonly InputInterface $input, private readonly OutputInterface $output, private readonly TestSuite $testSuite, - ) { - } + ) {} /** * Runs the subscriber. diff --git a/src/Support/ExpectationPipeline.php b/src/Support/ExpectationPipeline.php index c9d3f6ed..5e0d88db 100644 --- a/src/Support/ExpectationPipeline.php +++ b/src/Support/ExpectationPipeline.php @@ -30,8 +30,7 @@ final class ExpectationPipeline */ public function __construct( private readonly Closure $closure - ) { - } + ) {} /** * Creates a new instance of Expectation Pipeline with given closure. diff --git a/src/Support/NullClosure.php b/src/Support/NullClosure.php index 10d9c335..0f56a008 100644 --- a/src/Support/NullClosure.php +++ b/src/Support/NullClosure.php @@ -16,7 +16,6 @@ final class NullClosure */ public static function create(): Closure { - return Closure::fromCallable(function (): void { - }); + return Closure::fromCallable(function (): void {}); } } diff --git a/tests/Features/Covers.php b/tests/Features/Covers.php index 16f7be39..4fc4f48a 100644 --- a/tests/Features/Covers.php +++ b/tests/Features/Covers.php @@ -10,9 +10,7 @@ use Tests\Fixtures\Covers\CoversTrait; $runCounter = 0; -function testCoversFunction() -{ -} +function testCoversFunction() {} it('uses the correct PHPUnit attribute for class', function () { $attributes = (new ReflectionClass($this))->getAttributes(); diff --git a/tests/Features/Expect/toBeCallable.php b/tests/Features/Expect/toBeCallable.php index 77af5689..384a0c75 100644 --- a/tests/Features/Expect/toBeCallable.php +++ b/tests/Features/Expect/toBeCallable.php @@ -3,8 +3,7 @@ use PHPUnit\Framework\ExpectationFailedException; test('pass', function () { - expect(function () { - })->toBeCallable(); + expect(function () {})->toBeCallable(); expect(null)->not->toBeCallable(); }); diff --git a/tests/Features/Expect/toHaveMethods.php b/tests/Features/Expect/toHaveMethods.php index a02a3275..06c11006 100644 --- a/tests/Features/Expect/toHaveMethods.php +++ b/tests/Features/Expect/toHaveMethods.php @@ -4,13 +4,9 @@ use PHPUnit\Framework\ExpectationFailedException; $object = new class { - public function foo(): void - { - } + public function foo(): void {} - public function bar(): void - { - } + public function bar(): void {} }; test('pass', function () use ($object) { diff --git a/tests/Features/Expect/toMatchSnapshot.php b/tests/Features/Expect/toMatchSnapshot.php index 6dc3e83e..c3df8bac 100644 --- a/tests/Features/Expect/toMatchSnapshot.php +++ b/tests/Features/Expect/toMatchSnapshot.php @@ -43,9 +43,7 @@ test('pass with `__toString`', function () { $object = new class($this->snapshotable) { - public function __construct(protected string $snapshotable) - { - } + public function __construct(protected string $snapshotable) {} public function __toString() { @@ -61,9 +59,7 @@ test('pass with `toString`', function () { $object = new class($this->snapshotable) { - public function __construct(protected string $snapshotable) - { - } + public function __construct(protected string $snapshotable) {} public function toString() { @@ -97,9 +93,7 @@ test('pass with `toArray`', function () { $object = new class($this->snapshotable) { - public function __construct(protected string $snapshotable) - { - } + public function __construct(protected string $snapshotable) {} public function toArray() { @@ -125,9 +119,7 @@ test('pass with `toSnapshot`', function () { $object = new class($this->snapshotable) { - public function __construct(protected string $snapshotable) - { - } + public function __construct(protected string $snapshotable) {} public function toSnapshot() { diff --git a/tests/Features/Expect/toThrow.php b/tests/Features/Expect/toThrow.php index 1444ccca..72389026 100644 --- a/tests/Features/Expect/toThrow.php +++ b/tests/Features/Expect/toThrow.php @@ -2,9 +2,7 @@ use PHPUnit\Framework\ExpectationFailedException; -class CustomException extends Exception -{ -} +class CustomException extends Exception {} test('passes', function () { expect(function () { @@ -15,15 +13,13 @@ test('passes', function () { })->toThrow(Exception::class); expect(function () { throw new RuntimeException(); - })->toThrow(function (RuntimeException $e) { - }); + })->toThrow(function (RuntimeException $e) {}); expect(function () { throw new RuntimeException('actual message'); })->toThrow(function (Exception $e) { expect($e->getMessage())->toBe('actual message'); }); - expect(function () { - })->not->toThrow(Exception::class); + expect(function () {})->not->toThrow(Exception::class); expect(function () { throw new RuntimeException('actual message'); })->toThrow('actual message'); @@ -35,22 +31,18 @@ test('passes', function () { })->toThrow(RuntimeException::class, 'actual message'); expect(function () { throw new RuntimeException('actual message'); - })->toThrow(function (RuntimeException $e) { - }, 'actual message'); + })->toThrow(function (RuntimeException $e) {}, 'actual message'); expect(function () { throw new CustomException('foo'); })->toThrow(new CustomException('foo')); }); test('failures 1', function () { - expect(function () { - })->toThrow(RuntimeException::class); + expect(function () {})->toThrow(RuntimeException::class); })->throws(ExpectationFailedException::class, 'Exception "'.RuntimeException::class.'" not thrown.'); test('failures 2', function () { - expect(function () { - })->toThrow(function (RuntimeException $e) { - }); + expect(function () {})->toThrow(function (RuntimeException $e) {}); })->throws(ExpectationFailedException::class, 'Exception "'.RuntimeException::class.'" not thrown.'); test('failures 3', function () { @@ -77,8 +69,7 @@ test('failures 5', function () { })->throws(ExpectationFailedException::class, 'Failed asserting that \'actual message\' [ASCII](length: 14) contains "expected message" [ASCII](length: 16).'); test('failures 6', function () { - expect(function () { - })->toThrow('actual message'); + expect(function () {})->toThrow('actual message'); })->throws(ExpectationFailedException::class, 'Exception with message "actual message" not thrown'); test('failures 7', function () { @@ -106,15 +97,11 @@ test('not failures', function () { })->throws(ExpectationFailedException::class); test('closure missing parameter', function () { - expect(function () { - })->toThrow(function () { - }); + expect(function () {})->toThrow(function () {}); })->throws(InvalidArgumentException::class, 'The given closure must have a single parameter type-hinted as the class string.'); test('closure missing type-hint', function () { - expect(function () { - })->toThrow(function ($e) { - }); + expect(function () {})->toThrow(function ($e) {}); })->throws(InvalidArgumentException::class, 'The given closure\'s parameter must be type-hinted as the class string.'); it('can handle a non-defined exception', function () { diff --git a/tests/Fixtures/Arch/ToBeInvokable/IsInvokable/InvokableClass.php b/tests/Fixtures/Arch/ToBeInvokable/IsInvokable/InvokableClass.php index 24cbb979..5aa6e0e5 100644 --- a/tests/Fixtures/Arch/ToBeInvokable/IsInvokable/InvokableClass.php +++ b/tests/Fixtures/Arch/ToBeInvokable/IsInvokable/InvokableClass.php @@ -6,8 +6,5 @@ namespace Tests\Fixtures\Arch\ToBeInvokable\IsInvokable; class InvokableClass { - public function __invoke(): void - { - - } + public function __invoke(): void {} } diff --git a/tests/Fixtures/Arch/ToBeInvokable/IsInvokable/ParentInvokableClass.php b/tests/Fixtures/Arch/ToBeInvokable/IsInvokable/ParentInvokableClass.php index 89bc5904..b941b37e 100644 --- a/tests/Fixtures/Arch/ToBeInvokable/IsInvokable/ParentInvokableClass.php +++ b/tests/Fixtures/Arch/ToBeInvokable/IsInvokable/ParentInvokableClass.php @@ -6,8 +6,5 @@ namespace Tests\Fixtures\Arch\ToBeInvokable\IsInvokable; class ParentInvokableClass { - public function __invoke(): void - { - - } + public function __invoke(): void {} } diff --git a/tests/Fixtures/Arch/ToBeInvokable/IsNotInvokable/IsNotInvokableClass.php b/tests/Fixtures/Arch/ToBeInvokable/IsNotInvokable/IsNotInvokableClass.php index c645a0c3..d5485741 100644 --- a/tests/Fixtures/Arch/ToBeInvokable/IsNotInvokable/IsNotInvokableClass.php +++ b/tests/Fixtures/Arch/ToBeInvokable/IsNotInvokable/IsNotInvokableClass.php @@ -6,8 +6,5 @@ namespace Tests\Fixtures\Arch\ToBeInvokable\IsNotInvokable; class IsNotInvokableClass { - public function handle(): void - { - - } + public function handle(): void {} } diff --git a/tests/Fixtures/Arch/ToHaveAttribute/Attributes/AsAttribute.php b/tests/Fixtures/Arch/ToHaveAttribute/Attributes/AsAttribute.php index 00b913bd..cd8949e6 100644 --- a/tests/Fixtures/Arch/ToHaveAttribute/Attributes/AsAttribute.php +++ b/tests/Fixtures/Arch/ToHaveAttribute/Attributes/AsAttribute.php @@ -7,6 +7,4 @@ namespace Tests\Fixtures\Arch\ToHaveAttribute\Attributes; use Attribute; #[Attribute()] -class AsAttribute -{ -} +class AsAttribute {} diff --git a/tests/Fixtures/Arch/ToHaveAttribute/HaveAttribute/HaveAttributeClass.php b/tests/Fixtures/Arch/ToHaveAttribute/HaveAttribute/HaveAttributeClass.php index 49a0eb20..134c51b5 100644 --- a/tests/Fixtures/Arch/ToHaveAttribute/HaveAttribute/HaveAttributeClass.php +++ b/tests/Fixtures/Arch/ToHaveAttribute/HaveAttribute/HaveAttributeClass.php @@ -7,6 +7,4 @@ namespace Tests\Fixtures\Arch\ToHaveAttribute\HaveAttribute; use Tests\Fixtures\Arch\ToHaveAttribute\Attributes\AsAttribute; #[AsAttribute] -class HaveAttributeClass -{ -} +class HaveAttributeClass {} diff --git a/tests/Fixtures/Arch/ToHaveAttribute/NotHaveAttribute/NotHaveAttributeClass.php b/tests/Fixtures/Arch/ToHaveAttribute/NotHaveAttribute/NotHaveAttributeClass.php index 0628960c..f646cf85 100644 --- a/tests/Fixtures/Arch/ToHaveAttribute/NotHaveAttribute/NotHaveAttributeClass.php +++ b/tests/Fixtures/Arch/ToHaveAttribute/NotHaveAttribute/NotHaveAttributeClass.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Tests\Fixtures\Arch\ToHaveAttribute\NotHaveAttribute; -class NotHaveAttributeClass -{ -} +class NotHaveAttributeClass {} diff --git a/tests/Fixtures/Arch/ToHaveConstructor/HasConstructor/HasConstructor.php b/tests/Fixtures/Arch/ToHaveConstructor/HasConstructor/HasConstructor.php index 924e250d..f230cc5d 100644 --- a/tests/Fixtures/Arch/ToHaveConstructor/HasConstructor/HasConstructor.php +++ b/tests/Fixtures/Arch/ToHaveConstructor/HasConstructor/HasConstructor.php @@ -6,8 +6,5 @@ namespace Tests\Fixtures\Arch\ToHaveConstructor\HasConstructor; class HasConstructor { - public function __construct() - { - - } + public function __construct() {} } diff --git a/tests/Fixtures/Arch/ToHaveConstructor/HasNoConstructor/HasNoConstructor.php b/tests/Fixtures/Arch/ToHaveConstructor/HasNoConstructor/HasNoConstructor.php index c798078e..9c6a4587 100644 --- a/tests/Fixtures/Arch/ToHaveConstructor/HasNoConstructor/HasNoConstructor.php +++ b/tests/Fixtures/Arch/ToHaveConstructor/HasNoConstructor/HasNoConstructor.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Tests\Fixtures\Arch\ToHaveConstructor\HasNoConstructor; -class HasNoConstructor -{ -} +class HasNoConstructor {} diff --git a/tests/Fixtures/Arch/ToHaveDestructor/HasDestructor/HasDestructor.php b/tests/Fixtures/Arch/ToHaveDestructor/HasDestructor/HasDestructor.php index 4d367485..00de1ae9 100644 --- a/tests/Fixtures/Arch/ToHaveDestructor/HasDestructor/HasDestructor.php +++ b/tests/Fixtures/Arch/ToHaveDestructor/HasDestructor/HasDestructor.php @@ -6,8 +6,5 @@ namespace Tests\Fixtures\Arch\ToHaveDestructor\HasDestructor; class HasDestructor { - public function __destruct() - { - - } + public function __destruct() {} } diff --git a/tests/Fixtures/Arch/ToHaveDestructor/HasNoDestructor/HasNoDestructor.php b/tests/Fixtures/Arch/ToHaveDestructor/HasNoDestructor/HasNoDestructor.php index eea037ed..01798952 100644 --- a/tests/Fixtures/Arch/ToHaveDestructor/HasNoDestructor/HasNoDestructor.php +++ b/tests/Fixtures/Arch/ToHaveDestructor/HasNoDestructor/HasNoDestructor.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Tests\Fixtures\Arch\ToHaveDestructor\HasNoDestructor; -class HasNoDestructor -{ -} +class HasNoDestructor {} diff --git a/tests/Fixtures/Arch/ToHaveMethod/HasMethod/HasMethod.php b/tests/Fixtures/Arch/ToHaveMethod/HasMethod/HasMethod.php index 63c79b00..8bd2252f 100644 --- a/tests/Fixtures/Arch/ToHaveMethod/HasMethod/HasMethod.php +++ b/tests/Fixtures/Arch/ToHaveMethod/HasMethod/HasMethod.php @@ -6,8 +6,5 @@ namespace Tests\Fixtures\Arch\ToHaveMethod\HasMethod; class HasMethod { - public function foo(): void - { - - } + public function foo(): void {} } diff --git a/tests/Fixtures/Arch/ToHaveMethod/HasMethod/HasMethodTrait.php b/tests/Fixtures/Arch/ToHaveMethod/HasMethod/HasMethodTrait.php index 1d4651c5..feb3e9dc 100644 --- a/tests/Fixtures/Arch/ToHaveMethod/HasMethod/HasMethodTrait.php +++ b/tests/Fixtures/Arch/ToHaveMethod/HasMethod/HasMethodTrait.php @@ -6,8 +6,5 @@ namespace Tests\Fixtures\Arch\ToHaveMethod\HasMethod; trait HasMethodTrait { - public function foo(): void - { - - } + public function foo(): void {} } diff --git a/tests/Fixtures/Arch/ToHaveMethod/HasMethod/ParentHasMethodClass.php b/tests/Fixtures/Arch/ToHaveMethod/HasMethod/ParentHasMethodClass.php index 3d0de894..4bde5340 100644 --- a/tests/Fixtures/Arch/ToHaveMethod/HasMethod/ParentHasMethodClass.php +++ b/tests/Fixtures/Arch/ToHaveMethod/HasMethod/ParentHasMethodClass.php @@ -6,8 +6,5 @@ namespace Tests\Fixtures\Arch\ToHaveMethod\HasMethod; class ParentHasMethodClass { - public function foo(): void - { - - } + public function foo(): void {} } diff --git a/tests/Fixtures/Arch/ToHaveMethod/HasNoMethod/HasNoMethodClass.php b/tests/Fixtures/Arch/ToHaveMethod/HasNoMethod/HasNoMethodClass.php index 7d33a9f0..27556739 100644 --- a/tests/Fixtures/Arch/ToHaveMethod/HasNoMethod/HasNoMethodClass.php +++ b/tests/Fixtures/Arch/ToHaveMethod/HasNoMethod/HasNoMethodClass.php @@ -6,8 +6,5 @@ namespace Tests\Fixtures\Arch\ToHaveMethod\HasNoMethod; class HasNoMethodClass { - public function bar(): void - { - - } + public function bar(): void {} } diff --git a/tests/Fixtures/Arch/ToHavePrefix/HasNoPrefix/ClassWithout.php b/tests/Fixtures/Arch/ToHavePrefix/HasNoPrefix/ClassWithout.php index 19281e44..3f493f5d 100644 --- a/tests/Fixtures/Arch/ToHavePrefix/HasNoPrefix/ClassWithout.php +++ b/tests/Fixtures/Arch/ToHavePrefix/HasNoPrefix/ClassWithout.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Tests\Fixtures\Arch\ToHavePrefix\HasNoPrefix; -class ClassWithout -{ -} +class ClassWithout {} diff --git a/tests/Fixtures/Arch/ToHavePrefix/HasPrefix/PrefixClassWith.php b/tests/Fixtures/Arch/ToHavePrefix/HasPrefix/PrefixClassWith.php index 7ff074b1..e347a4de 100644 --- a/tests/Fixtures/Arch/ToHavePrefix/HasPrefix/PrefixClassWith.php +++ b/tests/Fixtures/Arch/ToHavePrefix/HasPrefix/PrefixClassWith.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Tests\Fixtures\Arch\ToHavePrefix\HasPrefix; -class PrefixClassWith -{ -} +class PrefixClassWith {} diff --git a/tests/Fixtures/Arch/ToHaveSuffix/HasNoSuffix/ClassWithout.php b/tests/Fixtures/Arch/ToHaveSuffix/HasNoSuffix/ClassWithout.php index c08d8e8e..e1cf6f95 100644 --- a/tests/Fixtures/Arch/ToHaveSuffix/HasNoSuffix/ClassWithout.php +++ b/tests/Fixtures/Arch/ToHaveSuffix/HasNoSuffix/ClassWithout.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Tests\Fixtures\Arch\ToHaveSuffix\HasNoSuffix; -class ClassWithout -{ -} +class ClassWithout {} diff --git a/tests/Fixtures/Arch/ToHaveSuffix/HasSuffix/ClassWithSuffix.php b/tests/Fixtures/Arch/ToHaveSuffix/HasSuffix/ClassWithSuffix.php index 2cc5a15d..a5bcb6d4 100644 --- a/tests/Fixtures/Arch/ToHaveSuffix/HasSuffix/ClassWithSuffix.php +++ b/tests/Fixtures/Arch/ToHaveSuffix/HasSuffix/ClassWithSuffix.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Tests\Fixtures\Arch\ToHaveSuffix\HasSuffix; -class ClassWithSuffix -{ -} +class ClassWithSuffix {} diff --git a/tests/Fixtures/Covers/CoversClass1.php b/tests/Fixtures/Covers/CoversClass1.php index 0fde28f6..ee0a4d40 100644 --- a/tests/Fixtures/Covers/CoversClass1.php +++ b/tests/Fixtures/Covers/CoversClass1.php @@ -4,7 +4,5 @@ namespace Tests\Fixtures\Covers; class CoversClass1 { - public function foo() - { - } + public function foo() {} } diff --git a/tests/Fixtures/Covers/CoversClass2.php b/tests/Fixtures/Covers/CoversClass2.php index 7828b898..66c2f965 100644 --- a/tests/Fixtures/Covers/CoversClass2.php +++ b/tests/Fixtures/Covers/CoversClass2.php @@ -2,6 +2,4 @@ namespace Tests\Fixtures\Covers; -class CoversClass2 -{ -} +class CoversClass2 {} diff --git a/tests/Fixtures/Covers/CoversClass3.php b/tests/Fixtures/Covers/CoversClass3.php index 82b68413..19c31645 100644 --- a/tests/Fixtures/Covers/CoversClass3.php +++ b/tests/Fixtures/Covers/CoversClass3.php @@ -2,6 +2,4 @@ namespace Tests\Fixtures\Covers; -class CoversClass3 -{ -} +class CoversClass3 {} diff --git a/tests/Fixtures/Covers/CoversTrait.php b/tests/Fixtures/Covers/CoversTrait.php index 6de082b9..b7df199e 100644 --- a/tests/Fixtures/Covers/CoversTrait.php +++ b/tests/Fixtures/Covers/CoversTrait.php @@ -2,6 +2,4 @@ namespace Tests\Fixtures\Covers; -trait CoversTrait -{ -} +trait CoversTrait {} diff --git a/tests/Unit/Support/Container.php b/tests/Unit/Support/Container.php index 3517c65d..4206bdcc 100644 --- a/tests/Unit/Support/Container.php +++ b/tests/Unit/Support/Container.php @@ -50,21 +50,15 @@ it('cannot resolve a parameter without type', function () { class ClassWithDependency { - public function __construct(Container $container) - { - } + public function __construct(Container $container) {} } class ClassWithSubDependency { - public function __construct(ClassWithDependency $param) - { - } + public function __construct(ClassWithDependency $param) {} } class ClassWithoutTypeParameter { - public function __construct($param) - { - } + public function __construct($param) {} } diff --git a/tests/Unit/Support/Reflection.php b/tests/Unit/Support/Reflection.php index 759473c4..c9d87806 100644 --- a/tests/Unit/Support/Reflection.php +++ b/tests/Unit/Support/Reflection.php @@ -3,8 +3,7 @@ use Pest\Support\Reflection; it('gets file name from closure', function () { - $fileName = Reflection::getFileNameFromClosure(function () { - }); + $fileName = Reflection::getFileNameFromClosure(function () {}); expect($fileName)->toBe(__FILE__); }); diff --git a/tests/Unit/TestSuite.php b/tests/Unit/TestSuite.php index 5a2ceb58..c718ad0d 100644 --- a/tests/Unit/TestSuite.php +++ b/tests/Unit/TestSuite.php @@ -20,8 +20,7 @@ it('does not allow to add the same test description twice', function () { it('alerts users about tests with arguments but no input', function () { $testSuite = new TestSuite(getcwd(), 'tests'); - $method = new TestCaseMethodFactory('foo', function (int $arg) { - }); + $method = new TestCaseMethodFactory('foo', function (int $arg) {}); $method->description = 'bar';