Skip to content

Commit

Permalink
Modify health controller:
Browse files Browse the repository at this point in the history
Replace output type hint instead doc block comments.
  • Loading branch information
Mohammadreza-73 committed Jan 6, 2023
1 parent 75a4af6 commit 8d471af
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions src/Http/Controllers/HealthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,7 @@ public function index()
return view('health::index', compact('data'));
}

/**
* Check database connection
*
* @return bool
*/
private static function checkDataBase()
private static function checkDataBase(): bool
{
try {
DB::connection()->getPdo();
Expand All @@ -70,12 +65,7 @@ private static function checkDataBase()
}
}

/**
* Check migrations
*
* @return bool
*/
private static function checkMigrataions()
private static function checkMigrataions(): bool
{
$migrations = DB::table('migrations')->get();
$files = Storage::files(base_path() . '/database/migrations/');
Expand All @@ -86,12 +76,7 @@ private static function checkMigrataions()
return false;
}

/**
* Check routes
*
* @return bool
*/
private static function checkRoutes()
private static function checkRoutes(): bool
{
$blackList = ['health'];
$routes = Route::getRoutes()->getRoutesByMethod()['GET'];
Expand Down

0 comments on commit 8d471af

Please sign in to comment.