Completed
Push — ft/remove-vendor ( 825fc6...4801b9 )
by Philippe
56:00 queued 47:37
created

HomepageSetCheck   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 4
c 0
b 0
f 0
dl 0
loc 12
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A check() 0 5 1
A message() 0 3 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Thinktomorrow\Chief\HealthMonitor\Checks;
6
7
use Thinktomorrow\Chief\Settings\Setting;
8
9
class HomepageSetCheck implements HealthCheck
10
{
11 31
    public function check(): bool
12
    {
13 31
        $homepageValue = chiefSetting(Setting::HOMEPAGE);
14
15 31
        return !!$homepageValue;
16
    }
17
18 31
    public function message(): string
19
    {
20 31
        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>';
21
    }
22
}
23