@@ -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 | } |
@@ -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\Menu; |
| 4 | 4 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | { |
| 26 | 26 | $collection = NodeCollection::fromArray($items); |
| 27 | 27 | |
| 28 | - $collection->mapRecursive(function ($node) { |
|
| 28 | + $collection->mapRecursive(function($node) { |
|
| 29 | 29 | return $node->replaceEntry((new MenuItem())->entry($node)); |
| 30 | 30 | }); |
| 31 | 31 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | public function items(): NodeCollection |
| 43 | 43 | { |
| 44 | 44 | if (!$this->includeHidden) { |
| 45 | - $this->collection = $this->collection->shake(function ($node) { |
|
| 45 | + $this->collection = $this->collection->shake(function($node) { |
|
| 46 | 46 | return !$node->hidden_in_menu && !$node->draft; |
| 47 | 47 | }); |
| 48 | 48 | } |
@@ -55,22 +55,22 @@ discard block |
||
| 55 | 55 | $this->collection = $this->items(); |
| 56 | 56 | |
| 57 | 57 | if ($id) { |
| 58 | - $this->collection = $this->collection->prune(function ($node) use ($id) { |
|
| 58 | + $this->collection = $this->collection->prune(function($node) use ($id) { |
|
| 59 | 59 | return !in_array($id, $node->pluckAncestors('id')); |
| 60 | 60 | }); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - $menu = $this->collection->mapRecursive(function ($node) { |
|
| 63 | + $menu = $this->collection->mapRecursive(function($node) { |
|
| 64 | 64 | $entry = $node->entry(); |
| 65 | 65 | $label = $entry->label; |
| 66 | - $entry->label = $node->depth() != 0 ? (str_repeat('-', $node->depth())) . '>' : ''; |
|
| 66 | + $entry->label = $node->depth() != 0 ? (str_repeat('-', $node->depth())).'>' : ''; |
|
| 67 | 67 | $entry->label .= $label; |
| 68 | 68 | return $node->replaceEntry($entry); |
| 69 | 69 | }); |
| 70 | 70 | |
| 71 | 71 | $menuitems = collect(); |
| 72 | - $menu->flatten()->each(function ($node) use ($menuitems) { |
|
| 73 | - $menuitems[] = [ |
|
| 72 | + $menu->flatten()->each(function($node) use ($menuitems) { |
|
| 73 | + $menuitems[] = [ |
|
| 74 | 74 | 'label' => $node->label, |
| 75 | 75 | 'id' => $node->id |
| 76 | 76 | ]; |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types = 1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Thinktomorrow\Chief\Concerns\HasPeriod; |
| 4 | 4 | |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types = 1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Thinktomorrow\Chief\Fields\Types; |
| 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\Filters; |
| 4 | 4 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | public function render(array $requestInput = []): string |
| 50 | 50 | { |
| 51 | - $path = $this->viewpath ?? 'chief::back._filters.' . $this->type; |
|
| 51 | + $path = $this->viewpath ?? 'chief::back._filters.'.$this->type; |
|
| 52 | 52 | $this->default($requestInput[$this->name] ?? null); |
| 53 | 53 | |
| 54 | 54 | return view($path, ['filter' => $this])->render(); |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | if (!in_array($name, ['name', 'label', 'description', 'query', 'viewpath', 'default'])) { |
| 65 | - throw new \InvalidArgumentException('Cannot set value by ['. $name .'].'); |
|
| 65 | + throw new \InvalidArgumentException('Cannot set value by ['.$name.'].'); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | $this->values[$name] = $arguments[0]; |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | 'url-slugs.*' => 'taalspecifieke link', |
| 53 | 53 | ]) |
| 54 | 54 | ->view('chief::back._fields.url-slugs') |
| 55 | - ->viewData(['fields' => UrlSlugFields::fromModel($this->manager->hasExistingModel() ? $this->manager->existingModel() : $this->manager->modelInstance()) ]), |
|
| 55 | + ->viewData(['fields' => UrlSlugFields::fromModel($this->manager->hasExistingModel() ? $this->manager->existingModel() : $this->manager->modelInstance())]), |
|
| 56 | 56 | ]); |
| 57 | 57 | } |
| 58 | 58 | |
@@ -62,9 +62,9 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | // Push update to homepage setting value |
| 64 | 64 | // TODO: we should just fetch the homepages and push that instead... |
| 65 | - UrlRecord::getByModel($this->manager->existingModel())->reject(function ($record) { |
|
| 65 | + UrlRecord::getByModel($this->manager->existingModel())->reject(function($record) { |
|
| 66 | 66 | return ($record->isRedirect() || !$record->isHomepage()); |
| 67 | - })->each(function ($record) { |
|
| 67 | + })->each(function($record) { |
|
| 68 | 68 | app(ChangeHomepage::class)->onUrlChanged($record); |
| 69 | 69 | }); |
| 70 | 70 | } |
@@ -76,8 +76,8 @@ discard block |
||
| 76 | 76 | |
| 77 | 77 | private function validateModel() |
| 78 | 78 | { |
| 79 | - if (! $this->manager->existingModel() instanceof ProvidesUrl) { |
|
| 80 | - throw new \Exception('UrlAssistant requires the model interfaced by ' . ProvidesUrl::class . '.'); |
|
| 79 | + if (!$this->manager->existingModel() instanceof ProvidesUrl) { |
|
| 80 | + throw new \Exception('UrlAssistant requires the model interfaced by '.ProvidesUrl::class.'.'); |
|
| 81 | 81 | } |
| 82 | 82 | } |
| 83 | 83 | } |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types = 1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Thinktomorrow\Chief\Snippets; |
| 4 | 4 | |
@@ -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 | |