mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 06:01:21 +00:00
Improve code coverage.
This commit is contained in:
@@ -33,6 +33,8 @@ use Log;
|
||||
|
||||
/**
|
||||
* Class Installer
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
*/
|
||||
class Installer
|
||||
{
|
||||
@@ -48,6 +50,7 @@ class Installer
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
*
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
|
||||
@@ -60,7 +60,7 @@ class IsDemoUser
|
||||
return response()->redirectTo($previous);
|
||||
}
|
||||
|
||||
return response()->redirectTo(route('index'));
|
||||
return response()->redirectTo(route('index')); // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
|
||||
@@ -108,9 +108,11 @@ class Range
|
||||
private function loseItAll(Request $request): void
|
||||
{
|
||||
if ('sqlite' === getenv('DB_CONNECTION') && true === getenv('IS_DOCKER')) {
|
||||
// @codeCoverageIgnoreStart
|
||||
$request->session()->flash(
|
||||
'error', 'You seem to be using SQLite in a Docker container. Don\'t do this. If the container restarts all your data will be gone.'
|
||||
);
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -87,6 +87,7 @@ class Sandstorm
|
||||
* @param string $email
|
||||
*
|
||||
* @return User
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
private function createUser(string $email): User
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ class SecureHeaders
|
||||
$google = '';
|
||||
$analyticsId = env('ANALYTICS_ID', '');
|
||||
if ('' !== $analyticsId) {
|
||||
$google = 'https://www.google-analytics.com/analytics.js';
|
||||
$google = 'https://www.google-analytics.com/analytics.js'; // @codeCoverageIgnore
|
||||
}
|
||||
$csp = [
|
||||
"default-src 'none'",
|
||||
|
||||
Reference in New Issue
Block a user