@@ -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]; |
@@ -11,6 +11,6 @@ |
||
11 | 11 | { |
12 | 12 | public function apply(Builder $builder, Model $model) |
13 | 13 | { |
14 | - $builder->where('current_state','<>', PageState::ARCHIVED); |
|
14 | + $builder->where('current_state', '<>', PageState::ARCHIVED); |
|
15 | 15 | } |
16 | 16 | } |
@@ -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 | } |
@@ -16,7 +16,7 @@ |
||
16 | 16 | try { |
17 | 17 | DB::beginTransaction(); |
18 | 18 | |
19 | - $invitation = Invitation::make((string) $invitee->id, (string) $inviter->id); |
|
19 | + $invitation = Invitation::make((string)$invitee->id, (string)$inviter->id); |
|
20 | 20 | |
21 | 21 | (new InvitationState($invitation))->apply('invite'); |
22 | 22 |
@@ -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 |