@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Thinktomorrow\Chief\HealthMonitor\Notifiers; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Thinktomorrow\Chief\HealthMonitor\Checks; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Thinktomorrow\Chief\HealthMonitor\Notifiers; |
6 | 6 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Thinktomorrow\Chief\HealthMonitor\Checks; |
6 | 6 | |
@@ -17,6 +17,6 @@ discard block |
||
17 | 17 | |
18 | 18 | public function message(): string |
19 | 19 | { |
20 | - 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>'; |
|
20 | + 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 | 21 | } |
22 | 22 | } |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | */ |
20 | 20 | public static function allOnlineModels(bool $onlySingles = false, Model $ignoredModel = null): array |
21 | 21 | { |
22 | - return chiefMemoize('all-online-models', function () use ($onlySingles, $ignoredModel) { |
|
22 | + return chiefMemoize('all-online-models', function() use ($onlySingles, $ignoredModel) { |
|
23 | 23 | $builder = UrlRecord::whereNull('redirect_id') |
24 | 24 | ->select('model_type', 'model_id') |
25 | 25 | ->groupBy('model_type', 'model_id'); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | } |
30 | 30 | |
31 | 31 | if ($ignoredModel) { |
32 | - $builder->whereNotIn('id', function ($query) use ($ignoredModel) { |
|
32 | + $builder->whereNotIn('id', function($query) use ($ignoredModel) { |
|
33 | 33 | $query->select('id') |
34 | 34 | ->from('chief_urls') |
35 | 35 | ->where('model_type', '=', $ignoredModel->getMorphClass()) |
@@ -37,14 +37,14 @@ discard block |
||
37 | 37 | }); |
38 | 38 | } |
39 | 39 | |
40 | - $liveUrlRecords = $builder->get()->mapToGroups(function ($record) { |
|
40 | + $liveUrlRecords = $builder->get()->mapToGroups(function($record) { |
|
41 | 41 | return [$record->model_type => $record->model_id]; |
42 | 42 | }); |
43 | 43 | |
44 | 44 | // Get model for each of these records... |
45 | - $models = $liveUrlRecords->map(function ($record, $key) { |
|
45 | + $models = $liveUrlRecords->map(function($record, $key) { |
|
46 | 46 | return Morphables::instance($key)->find($record->toArray()); |
47 | - })->map->reject(function ($model) { |
|
47 | + })->map->reject(function($model) { |
|
48 | 48 | // Invalid references to archived or removed models where url record still exists. |
49 | 49 | return is_null($model) || !$model->isPublished(); |
50 | 50 | })->flatten(); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Thinktomorrow\Chief\HealthMonitor; |
6 | 6 | |
@@ -15,13 +15,13 @@ discard block |
||
15 | 15 | |
16 | 16 | public static function check() |
17 | 17 | { |
18 | - foreach(static::$checks as $check => $notifier) |
|
18 | + foreach (static::$checks as $check => $notifier) |
|
19 | 19 | { |
20 | 20 | $checkInstance = app($check); |
21 | 21 | |
22 | - if(!$checkInstance->check()) { |
|
22 | + if (!$checkInstance->check()) { |
|
23 | 23 | app($notifier)->onFailure($checkInstance); |
24 | - } else { |
|
24 | + }else { |
|
25 | 25 | app($notifier)->onSuccess($checkInstance); |
26 | 26 | } |
27 | 27 | } |