Conditions | 4 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | 2 | public static function is($model, string $locale = null): bool |
|
12 | { |
||
13 | 2 | $homepageValue = chiefSetting(Setting::HOMEPAGE, $locale); |
|
14 | |||
15 | 2 | if(!$homepageValue || !is_object($model) || !$model instanceof ProvidesFlatReference) { |
|
16 | 2 | return false; |
|
17 | } |
||
18 | |||
19 | 1 | return $model->flatReference()->is($homepageValue); |
|
20 | } |
||
31 |