Skip to content

Commit

Permalink
style: format code
Browse files Browse the repository at this point in the history
  • Loading branch information
mochaaP committed Jan 12, 2024
1 parent 35bd452 commit 0a43c5a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
1 change: 1 addition & 0 deletions app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ protected function convertExceptionToArray(Throwable $e)
// @codeCoverageIgnoreStart
$isFromPlugins = !app()->runningUnitTests()
&& Str::contains($trace['file'], resolve('plugins')->getPluginsDirs()->all());

// @codeCoverageIgnoreEnd
return Str::startsWith($trace['file'], 'app') || $isFromPlugins;
})
Expand Down
24 changes: 12 additions & 12 deletions app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class Kernel extends HttpKernel
\Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\Illuminate\Foundation\Http\Middleware\TrimStrings::class,
\App\Http\Middleware\ConvertEmptyStringsToNull::class,
\App\Http\Middleware\DetectLanguagePrefer::class,
Middleware\ConvertEmptyStringsToNull::class,
Middleware\DetectLanguagePrefer::class,
];

/**
Expand All @@ -33,8 +33,8 @@ class Kernel extends HttpKernel
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken::class,
\App\Http\Middleware\EnforceEverGreen::class,
\App\Http\Middleware\RedirectToSetup::class,
Middleware\EnforceEverGreen::class,
Middleware\RedirectToSetup::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],

Expand All @@ -44,9 +44,9 @@ class Kernel extends HttpKernel

'authorize' => [
'auth:web',
\App\Http\Middleware\RejectBannedUser::class,
\App\Http\Middleware\EnsureEmailFilled::class,
\App\Http\Middleware\FireUserAuthenticated::class,
Middleware\RejectBannedUser::class,
Middleware\EnsureEmailFilled::class,
Middleware\FireUserAuthenticated::class,
],
];

Expand All @@ -58,13 +58,13 @@ class Kernel extends HttpKernel
* @var array<string, class-string|string>
*/
protected $middlewareAliases = [
'auth' => \App\Http\Middleware\Authenticate::class,
'auth' => Middleware\Authenticate::class,
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'role' => \App\Http\Middleware\CheckRole::class,
'setup' => \App\Http\Middleware\CheckInstallation::class,
'guest' => Middleware\RedirectIfAuthenticated::class,
'role' => Middleware\CheckRole::class,
'setup' => Middleware\CheckInstallation::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \App\Http\Middleware\CheckUserVerified::class,
'verified' => Middleware\CheckUserVerified::class,
'scope' => \Laravel\Passport\Http\Middleware\CheckForAnyScope::class,
'scopes' => \Laravel\Passport\Http\Middleware\CheckScopes::class,
];
Expand Down
2 changes: 1 addition & 1 deletion app/Services/OptionForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function __construct(string $id, string $title = self::AUTO_DETECT)
}

/**
* @throws \BadMethodCallException
* @throws BadMethodCallException
*/
public function __call(string $method, array $params): OptionFormItem
{
Expand Down
4 changes: 2 additions & 2 deletions tests/ServicesTest/PluginManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ public function testEnable()
$this->assertTrue($manager->getEnabledPlugins()->has('fake'));
$this->assertEquals(
'fake',
json_decode(resolve(\App\Services\Option::class)->get('plugins_enabled'), true)[0]['name']
json_decode(resolve(Option::class)->get('plugins_enabled'), true)[0]['name']
);

$this->assertTrue($manager->enable('dep')['unsatisfied']->isNotEmpty());
Expand All @@ -624,7 +624,7 @@ public function testDisable()
return true;
});
$this->assertFalse($manager->getEnabledPlugins()->has('fake'));
$this->assertCount(0, json_decode(resolve(\App\Services\Option::class)->get('plugins_enabled'), true));
$this->assertCount(0, json_decode(resolve(Option::class)->get('plugins_enabled'), true));
}

public function testDelete()
Expand Down

0 comments on commit 0a43c5a

Please sign in to comment.