@@ -11,7 +11,7 @@ |
||
11 | 11 | if (PreviewMode::fromRequest()->check()) { |
12 | 12 | Session::now('note.default', 'U bekijkt een preview.'); |
13 | 13 | return true; |
14 | - } else { |
|
14 | + }else { |
|
15 | 15 | return false; |
16 | 16 | } |
17 | 17 | } |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Thinktomorrow\Chief\Fields\Types; |
5 | 5 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Thinktomorrow\Chief\Fields\Types; |
5 | 5 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Thinktomorrow\Chief\Fields\Types; |
5 | 5 |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | $this->manager = $manager; |
32 | 32 | $this->model = $manager->model(); |
33 | 33 | |
34 | - if(!$this->model instanceof StatefulContract){ |
|
34 | + if (!$this->model instanceof StatefulContract) { |
|
35 | 35 | throw new \InvalidArgumentException('ArchiveAssistant requires the model to implement the StatefulContract.'); |
36 | 36 | } |
37 | 37 | } |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | public function findAll(): Collection |
69 | 69 | { |
70 | - return $this->model->archived()->get()->map(function ($model) { |
|
70 | + return $this->model->archived()->get()->map(function($model) { |
|
71 | 71 | return $this->managers->findByModel($model); |
72 | 72 | }); |
73 | 73 | } |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | |
98 | 98 | public function guard($verb): Assistant |
99 | 99 | { |
100 | - if (! $this->can($verb)) { |
|
100 | + if (!$this->can($verb)) { |
|
101 | 101 | NotAllowedManagerRoute::notAllowedVerb($verb, $this->manager); |
102 | 102 | } |
103 | 103 |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | $this->manager = $manager; |
34 | 34 | $this->model = $manager->model(); |
35 | 35 | |
36 | - if(!$this->model instanceof StatefulContract){ |
|
36 | + if (!$this->model instanceof StatefulContract) { |
|
37 | 37 | throw new \InvalidArgumentException('PublishAssistant requires the model to implement the StatefulContract.'); |
38 | 38 | } |
39 | 39 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | |
75 | 75 | public function findAll(): Collection |
76 | 76 | { |
77 | - return $this->model->published()->get()->map(function ($model) { |
|
77 | + return $this->model->published()->get()->map(function($model) { |
|
78 | 78 | return $this->managers->findByModel($model); |
79 | 79 | }); |
80 | 80 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | |
97 | 97 | public function guard($verb): Assistant |
98 | 98 | { |
99 | - if (! $this->can($verb)) { |
|
99 | + if (!$this->can($verb)) { |
|
100 | 100 | NotAllowedManagerRoute::notAllowedVerb($verb, $this->manager); |
101 | 101 | } |
102 | 102 | |
@@ -121,10 +121,10 @@ discard block |
||
121 | 121 | $class = 'text-warning'; |
122 | 122 | } |
123 | 123 | |
124 | - $statusAsLabel = '<span class="font-bold '. $class .'"><em>' . $label . '</em></span>'; |
|
124 | + $statusAsLabel = '<span class="font-bold '.$class.'"><em>'.$label.'</em></span>'; |
|
125 | 125 | |
126 | 126 | if (!$plain && $this->hasPreviewUrl()) { |
127 | - $statusAsLabel = '<a href="'.$this->previewUrl().'" target="_blank">'. $statusAsLabel .'</a>'; |
|
127 | + $statusAsLabel = '<a href="'.$this->previewUrl().'" target="_blank">'.$statusAsLabel.'</a>'; |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | return $statusAsLabel; |
@@ -89,7 +89,7 @@ |
||
89 | 89 | { |
90 | 90 | $transitions = []; |
91 | 91 | |
92 | - foreach($this->transitions as $transitionKey => $transition){ |
|
92 | + foreach ($this->transitions as $transitionKey => $transition) { |
|
93 | 93 | if (false !== array_search($this->statefulContract->state(), $transition['from'])) { |
94 | 94 | $transitions[] = $transitionKey; |
95 | 95 | } |
@@ -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 | /** |
@@ -44,7 +44,7 @@ |
||
44 | 44 | |
45 | 45 | public static function getByModel(Model $model) |
46 | 46 | { |
47 | - return chiefMemoize('url-records-get-by-model', function ($model) { |
|
47 | + return chiefMemoize('url-records-get-by-model', function($model) { |
|
48 | 48 | return parent::getByModel($model); |
49 | 49 | }, [$model]); |
50 | 50 | } |