Skip to content

Commit

Permalink
Fix code styling
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints authored and github-actions[bot] committed Aug 2, 2024
1 parent 3e2dbdc commit 716b019
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions tests/Feature/ArrayDriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ public function test_it_can_customise_default_scope()

Feature::active('foo');

Auth::login($user = new User());
Auth::login($user = new User);
Feature::active('foo');

Feature::resolveScopeUsing(fn () => 'bar');
Expand Down Expand Up @@ -987,7 +987,7 @@ public function foo()
public function test_feature_class_dependencies_do_not_go_stale()
{
$createContainer = function () {
$container = new Container();
$container = new Container;
$container->singleton(FeatureDependency::class);
$container->instance('events', new class
{
Expand Down
10 changes: 5 additions & 5 deletions tests/Feature/DatabaseDriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ public function test_it_can_customise_default_scope()

Feature::active('foo');

Auth::login($user = new User());
Auth::login($user = new User);
Feature::active('foo');

Feature::resolveScopeUsing(fn () => 'bar');
Expand Down Expand Up @@ -1309,7 +1309,7 @@ public function test_it_retries_3_times_and_then_fails()
if (Str::startsWith($event->sql, 'insert into "features"')) {
$insertAttempts++;
DB::table('features')->delete();
throw new UniqueConstraintViolationException($event->connectionName, $event->sql, $event->bindings, new RuntimeException());
throw new UniqueConstraintViolationException($event->connectionName, $event->sql, $event->bindings, new RuntimeException);
}
});

Expand All @@ -1333,7 +1333,7 @@ public function test_it_only_retries_on_conflicts()
DB::listen(function (QueryExecuted $event) use (&$insertAttempts) {
if (Str::startsWith($event->sql, 'insert into "features"')) {
$insertAttempts++;
throw new UniqueConstraintViolationException($event->connectionName, $event->sql, $event->bindings, new RuntimeException());
throw new UniqueConstraintViolationException($event->connectionName, $event->sql, $event->bindings, new RuntimeException);
}
});

Expand All @@ -1351,7 +1351,7 @@ public function test_it_retries_2_times_and_then_fails_for_individual_queries()
if (Str::startsWith($event->sql, 'insert into "features"')) {
$insertAttempts++;
DB::table('features')->delete();
throw new UniqueConstraintViolationException($event->connectionName, $event->sql, $event->bindings, new RuntimeException());
throw new UniqueConstraintViolationException($event->connectionName, $event->sql, $event->bindings, new RuntimeException);
}
});

Expand All @@ -1375,7 +1375,7 @@ public function test_it_only_retries_on_conflicts_for_individual_queries()
DB::listen(function (QueryExecuted $event) use (&$insertAttempts) {
if (Str::startsWith($event->sql, 'insert into "features"')) {
$insertAttempts++;
throw new UniqueConstraintViolationException($event->connectionName, $event->sql, $event->bindings, new RuntimeException());
throw new UniqueConstraintViolationException($event->connectionName, $event->sql, $event->bindings, new RuntimeException);
}
});

Expand Down
12 changes: 6 additions & 6 deletions tests/Feature/FeatureMiddlewareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected function setUp(): void
{
parent::setUp();

$this->middleware = new EnsureFeaturesAreActive();
$this->middleware = new EnsureFeaturesAreActive;
}

public function test_it_throws_a_http_exception_if_feature_is_not_defined(): void
Expand All @@ -31,7 +31,7 @@ public function test_it_throws_a_http_exception_if_feature_is_not_defined(): voi

$this->middleware->handle(
request: $this->createRequest('test', 'get'),
next: fn () => new Response(),
next: fn () => new Response,
features: 'test',
);
}
Expand All @@ -46,7 +46,7 @@ public function test_it_passes_if_feature_is_defined(): void
Response::HTTP_OK,
$this->middleware->handle(
request: $this->createRequest('test', 'get'),
next: fn () => new Response(),
next: fn () => new Response,
features: 'test',
)->getStatusCode(),
);
Expand All @@ -59,7 +59,7 @@ public function test_it_throws_an_exception_if_one_of_the_features_is_not_active

$this->middleware->handle(
$this->createRequest('test', 'get'),
fn () => new Response(),
fn () => new Response,
'test', 'another',
);
}
Expand All @@ -72,7 +72,7 @@ public function test_it_allows_custom_responses(): void

$response = $this->middleware->handle(
$this->createRequest('test', 'get'),
fn () => new Response(),
fn () => new Response,
'test', 'another',
);

Expand All @@ -92,7 +92,7 @@ public function test_it_passes_if_all_features_are_enabled(): void
Response::HTTP_OK,
$this->middleware->handle(
$this->createRequest('test', 'get'),
fn () => new Response(),
fn () => new Response,
'test', 'another',
)->getStatusCode(),
);
Expand Down

0 comments on commit 716b019

Please sign in to comment.