Passed
Push — ft/config-healthmonitor ( f13174 )
by Philippe
14:52 queued 03:34
created

HomepageSetCheck::message()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Thinktomorrow\Chief\HealthMonitor\Checks;
6
7
use Thinktomorrow\Chief\Settings\Setting;
8
use Thinktomorrow\Chief\HealthMonitor\Notifiers\AlertBarNotifier;
9
10
class HomepageSetCheck implements HealthCheck
11
{
12
    public function check(): bool
13
    {
14
        $homepageValue = chiefSetting(Setting::HOMEPAGE);
15
16
        return !!$homepageValue;
17
    }
18
19
    public function message(): string
20
    {
21
        return 'Het lijkt erop dat er geen homepagina ingesteld is. Stel er een in hier: <a href="'. route('chief.back.settings.edit') .'" class="text-secondary-800 underline hover:text-white">Settings</a>';
22
    }
23
24
    public function notifiers(): array
25
    {
26
        return [
27
            AlertBarNotifier::class,
28
        ];
29
    }
30
}
31