@@ -28,7 +28,7 @@ |
||
| 28 | 28 | { |
| 29 | 29 | $class = $this->pageState->isOnline() ? 'text-success' : 'text-warning'; |
| 30 | 30 | |
| 31 | - return '<span class="inline-xs stack-s '.$class.'">' . $this->stateAsLabel() . '</span>'; |
|
| 31 | + return '<span class="inline-xs stack-s '.$class.'">'.$this->stateAsLabel().'</span>'; |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | /** |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | public function assistant(string $assistantKey): Assistant |
| 52 | 52 | { |
| 53 | 53 | if (!$this->isAssistedBy($assistantKey)) { |
| 54 | - throw new MissingAssistant('No assistant [' . $assistantKey . '] registered on manager ' . static::class); |
|
| 54 | + throw new MissingAssistant('No assistant ['.$assistantKey.'] registered on manager '.static::class); |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | $instance = app($this->getAssistantClass($assistantKey)); |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | $genericModelInstance = $this->modelInstance(); |
| 17 | 17 | |
| 18 | 18 | // Generic model details |
| 19 | - $id = Str::slug($this->registration->key(). ($this->hasExistingModel() ? '-'. $this->existingModel()->id : '')); |
|
| 19 | + $id = Str::slug($this->registration->key().($this->hasExistingModel() ? '-'.$this->existingModel()->id : '')); |
|
| 20 | 20 | $key = $this->registration->key(); |
| 21 | 21 | $labelSingular = property_exists($genericModelInstance, 'labelSingular') ? $genericModelInstance->labelSingular : Str::singular($key); |
| 22 | 22 | $labelPlural = property_exists($genericModelInstance, 'labelPlural') ? $genericModelInstance->labelPlural : Str::plural($key); |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | return $this->indexPagination($builder); |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | - return $builder->get()->map(function ($model) { |
|
| 90 | + return $builder->get()->map(function($model) { |
|
| 91 | 91 | return (new static($this->registration))->manage($model); |
| 92 | 92 | }); |
| 93 | 93 | } |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | { |
| 116 | 116 | $paginator = $builder->paginate($this->pageCount); |
| 117 | 117 | |
| 118 | - $modifiedCollection = $builder->paginate($this->pageCount)->getCollection()->transform(function ($model) { |
|
| 118 | + $modifiedCollection = $builder->paginate($this->pageCount)->getCollection()->transform(function($model) { |
|
| 119 | 119 | return (new static($this->registration))->manage($model); |
| 120 | 120 | }); |
| 121 | 121 | |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | |
| 189 | 189 | public function guard($verb): Manager |
| 190 | 190 | { |
| 191 | - if (! $this->can($verb)) { |
|
| 191 | + if (!$this->can($verb)) { |
|
| 192 | 192 | NotAllowedManagerRoute::notAllowedVerb($verb, $this); |
| 193 | 193 | } |
| 194 | 194 | |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | $fields = $this->fields(); |
| 212 | 212 | |
| 213 | 213 | foreach ($this->assistantsAsClassNames() as $assistantClass) { |
| 214 | - if (! method_exists($assistantClass, 'fields')) { |
|
| 214 | + if (!method_exists($assistantClass, 'fields')) { |
|
| 215 | 215 | continue; |
| 216 | 216 | } |
| 217 | 217 | |
@@ -303,9 +303,9 @@ discard block |
||
| 303 | 303 | static::$bootedTraitMethods[$baseMethod] = []; |
| 304 | 304 | |
| 305 | 305 | foreach (class_uses_recursive($class) as $trait) { |
| 306 | - $method = class_basename($trait) . ucfirst($baseMethod); |
|
| 306 | + $method = class_basename($trait).ucfirst($baseMethod); |
|
| 307 | 307 | |
| 308 | - if (method_exists($class, $method) && ! in_array($method, static::$bootedTraitMethods[$baseMethod])) { |
|
| 308 | + if (method_exists($class, $method) && !in_array($method, static::$bootedTraitMethods[$baseMethod])) { |
|
| 309 | 309 | static::$bootedTraitMethods[$baseMethod][] = lcfirst($method); |
| 310 | 310 | } |
| 311 | 311 | } |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare(strict_types = 1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Thinktomorrow\Chief\HealthMonitor\Checks; |
| 4 | 4 | |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | |
| 15 | 15 | private function get_http_response_code(string $url) |
| 16 | 16 | { |
| 17 | - if ($url =='') { |
|
| 17 | + if ($url == '') { |
|
| 18 | 18 | return false; |
| 19 | 19 | } |
| 20 | 20 | |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | public function message(): string |
| 34 | 34 | { |
| 35 | - return 'Het lijkt erop dat de homepagina niet meer bereikbaar is. <a href="'. route('chief.back.settings.edit') .'" class="text-secondary-800 underline hover:text-white">Kies een nieuwe</a>.'; |
|
| 35 | + return 'Het lijkt erop dat de homepagina niet meer bereikbaar is. <a href="'.route('chief.back.settings.edit').'" class="text-secondary-800 underline hover:text-white">Kies een nieuwe</a>.'; |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | public function notifiers(): array |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types = 1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Thinktomorrow\Chief\HealthMonitor\Checks; |
| 4 | 4 | |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare(strict_types = 1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Thinktomorrow\Chief\HealthMonitor\Checks; |
| 4 | 4 | |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | |
| 17 | 17 | public function message(): string |
| 18 | 18 | { |
| 19 | - 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>'; |
|
| 19 | + 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 | 20 | } |
| 21 | 21 | |
| 22 | 22 | public function notifiers(): array |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types = 1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Thinktomorrow\Chief\HealthMonitor\Notifiers; |
| 4 | 4 | |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare(strict_types = 1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Thinktomorrow\Chief\HealthMonitor; |
| 4 | 4 | |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | foreach ($this->checks as $check) { |
| 21 | 21 | $checkInstance = app($check); |
| 22 | 22 | |
| 23 | - if (! $checkInstance instanceof HealthCheck) { |
|
| 23 | + if (!$checkInstance instanceof HealthCheck) { |
|
| 24 | 24 | throw new InvalidClassException('Checks must implement Healthcheck interface.'); |
| 25 | 25 | } |
| 26 | 26 | |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | app($notifier)->onFailure($checkInstance); |
| 32 | 32 | } |
| 33 | 33 | return; |
| 34 | - } else { |
|
| 34 | + }else { |
|
| 35 | 35 | foreach ($notifiers as $notifier) { |
| 36 | 36 | app($notifier)->onSuccess($checkInstance); |
| 37 | 37 | } |