Passed
Push — master ( 0db7f5...3c2912 )
by Ben
74:34 queued 68:06
created

HomepageCheck   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 1
b 0
f 0
dl 0
loc 12
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A check() 0 5 1
A notify() 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 HomepageCheck implements HealthCheck
10
{
11
    public static function check()
12
    {
13
        $homepageValue = chiefSetting(Setting::HOMEPAGE);
14
15
        return !!$homepageValue;
16
    }
17
18
    public static function notify()
19
    {
20
        return 'Het lijkt erop dat er geen homepagina ingesteld is. Stel er een in hier: <a href="'. route('chief.back.settings.edit') .'">Settings</a>';
21
    }
22
}
23