From 54f9397f47ff8e30e0f16d6ea7b04fed566ece8b Mon Sep 17 00:00:00 2001 From: jordanbrauer <18744334+jordanbrauer@users.noreply.github.com> Date: Tue, 6 Apr 2021 19:32:49 -0500 Subject: [PATCH] style: address stan + lint issues --- src/Concerns/TestCase.php | 9 ++++----- src/Repositories/TestRepository.php | 10 +++++----- tests/Hooks/AfterAllTest.php | 1 - tests/Hooks/AfterEachTest.php | 1 - tests/Hooks/BeforeAllTest.php | 1 - tests/Hooks/BeforeEachTest.php | 1 - tests/Pest.php | 3 +-- 7 files changed, 10 insertions(+), 16 deletions(-) diff --git a/src/Concerns/TestCase.php b/src/Concerns/TestCase.php index 8469b4b8..a0ecda8a 100644 --- a/src/Concerns/TestCase.php +++ b/src/Concerns/TestCase.php @@ -5,9 +5,8 @@ declare(strict_types=1); namespace Pest\Concerns; use Closure; -use Pest\Repositories\BeforeEachRepository; -use Pest\Support\ExceptionTrace; use Pest\Support\ChainableClosure; +use Pest\Support\ExceptionTrace; use Pest\TestSuite; use PHPUnit\Framework\ExecutionOrderDependency; use PHPUnit\Util\Test; @@ -58,7 +57,7 @@ trait TestCase public function __construct(Closure $test, string $description, array $data) { $this->__test = $test; - $this->__description = $description; + $this->__description = $description; parent::__construct('__test', $data); } @@ -173,7 +172,7 @@ trait TestCase $beforeEach = TestSuite::getInstance()->beforeEach->get(self::$__filename); - if ($this->beforeEach instanceof Closure) { + if ($this->beforeEach instanceof Closure) { $beforeEach = ChainableClosure::from($this->beforeEach, $beforeEach); } @@ -187,7 +186,7 @@ trait TestCase { $afterEach = TestSuite::getInstance()->afterEach->get(self::$__filename); - if ($this->afterEach instanceof Closure) { + if ($this->afterEach instanceof Closure) { $afterEach = ChainableClosure::from($this->afterEach, $afterEach); } diff --git a/src/Repositories/TestRepository.php b/src/Repositories/TestRepository.php index d9b5406d..b668b7d5 100644 --- a/src/Repositories/TestRepository.php +++ b/src/Repositories/TestRepository.php @@ -25,7 +25,7 @@ final class TestRepository private $state = []; /** - * @var array>> + * @var array>> */ private $uses = []; @@ -96,10 +96,10 @@ final class TestRepository /** * Uses the given `$testCaseClass` on the given `$paths`. * - * @param array $classOrTraits - * @param array $groups - * @param array $paths - * @param array $hooks + * @param array $classOrTraits + * @param array $groups + * @param array $paths + * @param array $hooks */ public function use(array $classOrTraits, array $groups, array $paths, array $hooks): void { diff --git a/tests/Hooks/AfterAllTest.php b/tests/Hooks/AfterAllTest.php index 746ed758..ae8d61f4 100644 --- a/tests/Hooks/AfterAllTest.php +++ b/tests/Hooks/AfterAllTest.php @@ -8,4 +8,3 @@ afterAll(function () { test('global afterAll execution order', function () { }); - diff --git a/tests/Hooks/AfterEachTest.php b/tests/Hooks/AfterEachTest.php index 1eea05dc..41dc6692 100644 --- a/tests/Hooks/AfterEachTest.php +++ b/tests/Hooks/AfterEachTest.php @@ -21,4 +21,3 @@ test('global afterEach execution order', function () { ->not() ->toHaveProperty('ith'); }); - diff --git a/tests/Hooks/BeforeAllTest.php b/tests/Hooks/BeforeAllTest.php index 4c38b9b7..0eb27eb9 100644 --- a/tests/Hooks/BeforeAllTest.php +++ b/tests/Hooks/BeforeAllTest.php @@ -8,4 +8,3 @@ beforeAll(function () { test('global beforeAll execution order', function () { }); - diff --git a/tests/Hooks/BeforeEachTest.php b/tests/Hooks/BeforeEachTest.php index e11a885b..a9317cef 100644 --- a/tests/Hooks/BeforeEachTest.php +++ b/tests/Hooks/BeforeEachTest.php @@ -24,4 +24,3 @@ test('global beforeEach execution order', function () { ->and($this->baz) ->toBe(2); }); - diff --git a/tests/Pest.php b/tests/Pest.php index 9c210e73..795d906a 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -10,10 +10,9 @@ uses() // dump(0); // }) ->afterEach(function () { - $this->ith = 0; + $this->ith = 0; }) // ->afterAll(function () { // dump(0); // }) ->in('Hooks'); -