Skip to content

Commit 304aff3

Browse files
committed
Fix: styling
1 parent 13d6c42 commit 304aff3

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/Http/Middleware/AuthorizeInboxMiddleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public function handle($request, Closure $next)
1111
{
1212
$ability = config('inbox.gate', 'viewMailbox');
1313

14-
if (!Gate::allows($ability)) {
14+
if (! Gate::allows($ability)) {
1515
$redirect = config('inbox.unauthorized_redirect');
1616

1717
if ($redirect) {

tests/Feature/AuthorizeInboxMiddlewareTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
describe(AuthorizeInboxMiddleware::class, function () {
88
beforeEach(function () {
9-
Route::get('/mailbox-test', fn() => 'ok')->middleware(AuthorizeInboxMiddleware::class);
9+
Route::get('/mailbox-test', fn () => 'ok')->middleware(AuthorizeInboxMiddleware::class);
1010
});
1111

1212
it('allows access when Gate::allows(inbox.view) returns true', function () {
@@ -35,10 +35,9 @@
3535
$this->get('/mailbox-test')->assertRedirect('/custom-unauthorized');
3636
});
3737

38-
3938
it('denies access in production when config forbids public access', function () {
4039
config()->set('inbox.public', false);
41-
$this->app->detectEnvironment(fn() => 'production');
40+
$this->app->detectEnvironment(fn () => 'production');
4241
Gate::shouldReceive('allows')->with('viewMailbox')->andReturn(false);
4342

4443
$this->get('/mailbox-test')->assertForbidden();

0 commit comments

Comments
 (0)