Apply fixes from StyleCI

This commit is contained in:
StyleCI Bot 2023-08-11 11:01:53 +00:00
parent 509f33e1b8
commit a2176c8c56
No known key found for this signature in database
GPG Key ID: E4A5316DFBB23575
3 changed files with 23 additions and 12 deletions

View File

@ -66,7 +66,7 @@ class AppComposer
} else {
$about = '';
}
$view->withAboutApp($about);
$view->withAppAnalytics($this->config->get('setting.app_analytics'));
$view->withAppAnalyticsGoSquared($this->config->get('setting.app_analytics_gs'));

View File

@ -168,10 +168,14 @@ class StatusPageController extends AbstractApiController
$metrics = app(MetricRepository::class);
switch ($type) {
case 'last_hour': $metricData = $metrics->listPointsLastHour($metric); break;
case 'today': $metricData = $metrics->listPointsToday($metric); break;
case 'week': $metricData = $metrics->listPointsForWeek($metric); break;
case 'month': $metricData = $metrics->listPointsForMonth($metric); break;
case 'last_hour': $metricData = $metrics->listPointsLastHour($metric);
break;
case 'today': $metricData = $metrics->listPointsToday($metric);
break;
case 'week': $metricData = $metrics->listPointsForWeek($metric);
break;
case 'month': $metricData = $metrics->listPointsForMonth($metric);
break;
default: $metricData = [];
}
@ -193,10 +197,14 @@ class StatusPageController extends AbstractApiController
$component = AutoPresenter::decorate($component);
switch ($component->status_color) {
case 'reds': $color = Config::get('setting.style_reds', '#FF6F6F'); break;
case 'blues': $color = Config::get('setting.style_blues', '#3498DB'); break;
case 'greens': $color = Config::get('setting.style_greens', '#7ED321'); break;
case 'yellows': $color = Config::get('setting.style_yellows', '#F7CA18'); break;
case 'reds': $color = Config::get('setting.style_reds', '#FF6F6F');
break;
case 'blues': $color = Config::get('setting.style_blues', '#3498DB');
break;
case 'greens': $color = Config::get('setting.style_greens', '#7ED321');
break;
case 'yellows': $color = Config::get('setting.style_yellows', '#F7CA18');
break;
default: $color = null;
}

View File

@ -48,9 +48,12 @@ class RepositoryServiceProvider extends ServiceProvider
$config = $app->make(ConfigRepository::class);
switch ($config->get('database.default')) {
case 'mysql': $repository = new MySqlRepository($config); break;
case 'pgsql': $repository = new PgSqlRepository($config); break;
case 'sqlite': $repository = new SqliteRepository($config); break;
case 'mysql': $repository = new MySqlRepository($config);
break;
case 'pgsql': $repository = new PgSqlRepository($config);
break;
case 'sqlite': $repository = new SqliteRepository($config);
break;
}
$dates = $app->make(DateFactory::class);