diff --git a/.phpmd/ruleset.xml b/.phpmd/ruleset.xml index 271e0d5..29570f9 100644 --- a/.phpmd/ruleset.xml +++ b/.phpmd/ruleset.xml @@ -17,5 +17,7 @@ + + + - diff --git a/src/AppHealth.php b/src/AppHealth.php index 985bea2..3dca152 100644 --- a/src/AppHealth.php +++ b/src/AppHealth.php @@ -10,7 +10,7 @@ class AppHealth { public function __construct( /** - * @var Collection + * @var Collection */ protected Collection $checks, ) { @@ -18,9 +18,6 @@ public function __construct( public function passes($checkName) { - /** - * @var HealthCheck $check - */ $check = $this->checks->filter(function ($check) use ($checkName) { return $check->name() == $checkName; })->first(); @@ -44,7 +41,7 @@ public function fails($checkName): bool /** * Returns a collection of all health checks * - * @return Collection + * @return Collection */ public function all(): Collection { diff --git a/src/Facade/HealthCheck.php b/src/Facade/HealthCheck.php index 1620685..142f1d1 100644 --- a/src/Facade/HealthCheck.php +++ b/src/Facade/HealthCheck.php @@ -2,8 +2,17 @@ namespace UKFast\HealthCheck\Facade; +use Illuminate\Support\Collection; use Illuminate\Support\Facades\Facade; +use UKFast\HealthCheck\AppHealth; +use UKFast\HealthCheck\HealthCheck as Check; +/** + * @method static bool passes(string $checkName) + * @method static bool fails(string $checkName) + * @method static Collection all() + * @see AppHealth + */ class HealthCheck extends Facade { public static function getFacadeAccessor(): string