Skip to content

Commit

Permalink
fix coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
holgerk committed Mar 29, 2024
1 parent bde26c1 commit 77820a9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

// use Pest\Contracts\Plugins\AddsOutput;
use Pest\Contracts\Plugins\HandlesArguments;
use Pest\Plugins\Concerns\HandleArguments;
use Pest\Contracts\Plugins\Terminable;
use Pest\Plugins\Concerns\HandleArguments;

/** @internal */
final class Plugin implements Terminable, HandlesArguments
Expand All @@ -16,6 +16,7 @@ final class Plugin implements Terminable, HandlesArguments

/** @var Insertion[] */
private static array $insertions = [];

public static bool $updateGolden = false;

public function handleArguments(array $arguments): array
Expand Down Expand Up @@ -103,6 +104,7 @@ private function getIndent(int $startPos, string $content): string
}
$offset += 1;
}

return $indent;
}
}
4 changes: 2 additions & 2 deletions tests/ExpectationsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use PHPUnit\Framework\Assert;
use PHPUnit\Framework\ExpectationFailedException;

beforeEach(fn() => Plugin::$updateGolden = false);
beforeEach(fn () => Plugin::$updateGolden = false);

test('pass', function () {
expect([1, 2, 3])->toEqualGolden([
Expand All @@ -16,7 +16,7 @@

foreach (array_map('basename', glob(__DIR__.'/cases/*')) as $case) {

test('generate golden - ' . $case, function () use($case) {
test('generate golden - '.$case, function () use ($case) {
// GIVEN
$caseDirectory = __DIR__.'/cases/'.$case;
$inputFile = $caseDirectory.'/input.php';
Expand Down
2 changes: 1 addition & 1 deletion tests/cases/indention/expected.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

{
if (true) {
expect([1, 2, 3])->toEqualGolden([
1,
2,
Expand Down
2 changes: 1 addition & 1 deletion tests/cases/indention/input.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

{
if (true) {
expect([1, 2, 3])->toEqualGolden(null);
}

Expand Down

0 comments on commit 77820a9

Please sign in to comment.