@@ -40,9 +40,9 @@ |
||
40 | 40 | if ($request->filled('template')) { |
41 | 41 | $this->applyTemplate->handle( |
42 | 42 | ModelReference::fromString($request->input('template'))->className(), |
43 | - (string) ModelReference::fromString($request->input('template'))->id(), |
|
43 | + (string)ModelReference::fromString($request->input('template'))->id(), |
|
44 | 44 | get_class($manager->existingModel()), |
45 | - (string) $manager->existingModel()->id |
|
45 | + (string)$manager->existingModel()->id |
|
46 | 46 | ); |
47 | 47 | } |
48 | 48 |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | $availableChildren = AvailableChildren::forParent($model); |
51 | 51 | |
52 | - $modules = $availableChildren->onlyModules()->reject(function ($module) use ($model) { |
|
52 | + $modules = $availableChildren->onlyModules()->reject(function($module) use ($model) { |
|
53 | 53 | return $module->owner_id != null && $module->owner_id != $model->id; |
54 | 54 | }); |
55 | 55 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $available_sets = ModelReferencePresenter::toGroupedSelectValues($availableChildren->onlySets())->toArray(); |
59 | 59 | |
60 | 60 | // Current sections |
61 | - $sections = $model->children()->map(function ($section, $index) { |
|
61 | + $sections = $model->children()->map(function($section, $index) { |
|
62 | 62 | if ($section instanceof TranslatableContract) { |
63 | 63 | $section->injectTranslationForForm(); |
64 | 64 | } |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | continue; |
195 | 195 | } |
196 | 196 | |
197 | - $child = $children->first(function ($c) use ($reference) { |
|
197 | + $child = $children->first(function($c) use ($reference) { |
|
198 | 198 | return $c->modelReference()->get() == $reference; |
199 | 199 | }); |
200 | 200 | |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | private function stripTagsBlacklist($value, $blacklist = []) |
246 | 246 | { |
247 | 247 | foreach ($blacklist as $tag) { |
248 | - $value = preg_replace('/<\/?' . $tag . '(.|\s)*?>/', '', $value); |
|
248 | + $value = preg_replace('/<\/?'.$tag.'(.|\s)*?>/', '', $value); |
|
249 | 249 | } |
250 | 250 | |
251 | 251 | return $value; |
@@ -34,14 +34,14 @@ discard block |
||
34 | 34 | |
35 | 35 | public function onlyModules(): Collection |
36 | 36 | { |
37 | - return $this->collection()->reject(function ($item) { |
|
37 | + return $this->collection()->reject(function($item) { |
|
38 | 38 | return ($item instanceof ActsAsParent); |
39 | 39 | }); |
40 | 40 | } |
41 | 41 | |
42 | 42 | public function onlyPages(): Collection |
43 | 43 | { |
44 | - return $this->collection()->filter(function ($item) { |
|
44 | + return $this->collection()->filter(function($item) { |
|
45 | 45 | return ($item instanceof ActsAsParent); |
46 | 46 | }); |
47 | 47 | } |
@@ -96,12 +96,12 @@ discard block |
||
96 | 96 | // } |
97 | 97 | |
98 | 98 | // Remove duplicate models |
99 | - $collection = $collection->unique(function ($model) { |
|
99 | + $collection = $collection->unique(function($model) { |
|
100 | 100 | return (new ModelReference(get_class($model), $model->id))->get(); |
101 | 101 | }); |
102 | 102 | |
103 | 103 | // Filter out our parent |
104 | - return $this->collection = $collection->reject(function ($item) { |
|
104 | + return $this->collection = $collection->reject(function($item) { |
|
105 | 105 | return ($item instanceof $this->parent && $item->id == $this->parent->id); |
106 | 106 | })->values(); |
107 | 107 | } |