From b8ac4968eea3f7184259e374c66ac538a5930f14 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Sun, 1 Jan 2023 20:27:38 +0000 Subject: [PATCH] chore: style changes --- .php-cs-fixer.dist.php | 10 +++++----- phpstan-baseline.neon | 10 ---------- src/Logging/TeamCity.php | 2 +- tests/Features/Expect/matchExpectation.php | 6 +++--- 4 files changed, 9 insertions(+), 19 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 906f7413..41956d0e 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -8,11 +8,11 @@ $finder = PhpCsFixer\Finder::create() ->append(['.php-cs-fixer.dist.php']); $rules = [ - '@Symfony' => true, - 'phpdoc_no_empty_return' => false, - 'array_syntax' => ['syntax' => 'short'], - 'yoda_style' => false, - 'binary_operator_spaces' => [ + '@Symfony' => true, + 'phpdoc_no_empty_return' => false, + 'array_syntax' => ['syntax' => 'short'], + 'yoda_style' => false, + 'binary_operator_spaces' => [ 'operators' => [ '=>' => 'align', '=' => 'align', diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 91587518..9d2f519a 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -55,11 +55,6 @@ parameters: count: 1 path: src/Console/Command.php - - - message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#" - count: 1 - path: src/Datasets.php - - message: "#^Method Pest\\\\Datasets\\:\\:getDataSetsCombinations\\(\\) has parameter \\$combinations with no value type specified in iterable type array\\.$#" count: 1 @@ -75,11 +70,6 @@ parameters: count: 1 path: src/Datasets.php - - - message: "#^Parameter \\#1 \\$key of static method Pest\\\\Datasets\\:\\:getDataSetDescription\\(\\) expects int\\|string, mixed given\\.$#" - count: 1 - path: src/Datasets.php - - message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#" count: 1 diff --git a/src/Logging/TeamCity.php b/src/Logging/TeamCity.php index 5fbcbbcb..f6539939 100644 --- a/src/Logging/TeamCity.php +++ b/src/Logging/TeamCity.php @@ -194,7 +194,7 @@ final class TeamCity extends DefaultResultPrinter } $this->printEvent(self::TEST_STARTED, [ - self::NAME => $test->getName(), + self::NAME => $test->getName(), // @phpstan-ignore-next-line self::LOCATION_HINT => self::PROTOCOL . $test->toString(), ]); diff --git a/tests/Features/Expect/matchExpectation.php b/tests/Features/Expect/matchExpectation.php index 2bea1be5..73f97ff7 100644 --- a/tests/Features/Expect/matchExpectation.php +++ b/tests/Features/Expect/matchExpectation.php @@ -47,7 +47,7 @@ it('runs with truthy', function () { return $value->toEqual('bar'); }, - true => function ($value) { + true => function ($value) { $this->matched = 'foo'; return $value->toEqual('foo'); @@ -88,7 +88,7 @@ it('runs with truthy closure condition', function () { return $value->toEqual('bar'); }, - true => function ($value) { + true => function ($value) { $this->matched = 'foo'; return $value->toEqual('foo'); @@ -141,7 +141,7 @@ it('can be used in higher order tests') false => function ($value) { return $value->toBeFalse(); }, - true => function ($value) { + true => function ($value) { return $value->toBeTrue(); }, ]