From fe3747f8501d475b651eb6f51da4e0a69ab6c46a Mon Sep 17 00:00:00 2001 From: Fabio Ivona Date: Tue, 1 Aug 2023 17:15:44 +0200 Subject: [PATCH] lint --- src/Repositories/SnapshotRepository.php | 6 +++--- src/TestSuite.php | 2 +- tests/Features/Expect/toMatchSnapshot.php | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Repositories/SnapshotRepository.php b/src/Repositories/SnapshotRepository.php index da321dfb..fe71b64a 100644 --- a/src/Repositories/SnapshotRepository.php +++ b/src/Repositories/SnapshotRepository.php @@ -110,8 +110,8 @@ final class SnapshotRepository $description = TestSuite::getInstance()->getDescription(); - if($this->getCurrentSnapshotCounter() > 1){ - $description .= '__' . $this->getCurrentSnapshotCounter(); + if ($this->getCurrentSnapshotCounter() > 1) { + $description .= '__'.$this->getCurrentSnapshotCounter(); } return sprintf('%s/%s.snap', $this->testsPath.'/'.$this->snapshotsPath.$relativePath, $description); @@ -131,7 +131,7 @@ final class SnapshotRepository { $key = $this->getCurrentSnapshotKey(); - if(!isset(self::$expectationsCounter[$key])){ + if (! isset(self::$expectationsCounter[$key])) { self::$expectationsCounter[$key] = 0; } diff --git a/src/TestSuite.php b/src/TestSuite.php index 5bfc03a2..c6e4debd 100644 --- a/src/TestSuite.php +++ b/src/TestSuite.php @@ -100,7 +100,7 @@ final class TestSuite return self::$instance; } - if (!self::$instance instanceof self) { + if (! self::$instance instanceof self) { Panic::with(new InvalidPestCommand()); } diff --git a/tests/Features/Expect/toMatchSnapshot.php b/tests/Features/Expect/toMatchSnapshot.php index 655ffbf0..86320e38 100644 --- a/tests/Features/Expect/toMatchSnapshot.php +++ b/tests/Features/Expect/toMatchSnapshot.php @@ -122,13 +122,13 @@ test('not failures', function () { })->throws(ExpectationFailedException::class); test('multiple snapshot expectations', function () { - expect("foo bar 1")->toMatchSnapshot(); + expect('foo bar 1')->toMatchSnapshot(); - expect("foo bar 2")->toMatchSnapshot(); + expect('foo bar 2')->toMatchSnapshot(); }); test('multiple snapshot expectations with datasets', function () { - expect("foo bar 1")->toMatchSnapshot(); + expect('foo bar 1')->toMatchSnapshot(); - expect("foo bar 2")->toMatchSnapshot(); + expect('foo bar 2')->toMatchSnapshot(); })->with([1, 'foo', 'bar', 'baz']);