mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-01-29 02:57:48 +01:00
Apply fixes from StyleCI
This commit is contained in:
parent
509f33e1b8
commit
a2176c8c56
@ -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'));
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user