@@ -37,10 +37,10 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | if ($verb == 'index' && $this->model->isPageSpecific()) { |
| 39 | 39 | if (!$this->model->page) { |
| 40 | - throw new \RuntimeException('Cannot retrieve parent for page specific module [type: ' . $this->registration->key() . ', id: ' . $this->existingModel()->id . ']'); |
|
| 40 | + throw new \RuntimeException('Cannot retrieve parent for page specific module [type: '.$this->registration->key().', id: '.$this->existingModel()->id.']'); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | - return app(Managers::class)->findByModel($this->model->page)->route('edit') . '#eigen-modules'; |
|
| 43 | + return app(Managers::class)->findByModel($this->model->page)->route('edit').'#eigen-modules'; |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | $routes = [ |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | if (is_array_empty($translation)) { |
| 161 | 161 | |
| 162 | 162 | // Nullify all values |
| 163 | - $trans[$locale] = array_map(function ($value) { |
|
| 163 | + $trans[$locale] = array_map(function($value) { |
|
| 164 | 164 | return null; |
| 165 | 165 | }, $translation); |
| 166 | 166 | continue; |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | return static::$managedModelKey; |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | - throw new \Exception('Missing required static property \'managedModelKey\' on ' . static::class . '.'); |
|
| 104 | + throw new \Exception('Missing required static property \'managedModelKey\' on '.static::class.'.'); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | /** |
@@ -141,9 +141,9 @@ discard block |
||
| 141 | 141 | public function flatReferenceLabel(): string |
| 142 | 142 | { |
| 143 | 143 | if ($this->exists) { |
| 144 | - $status = !$this->isPublished() ? ' [' . $this->statusAsPlainLabel() . ']' : null; |
|
| 144 | + $status = !$this->isPublished() ? ' ['.$this->statusAsPlainLabel().']' : null; |
|
| 145 | 145 | |
| 146 | - return $this->title ? $this->title . $status : ''; |
|
| 146 | + return $this->title ? $this->title.$status : ''; |
|
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | return ''; |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | $classKey = get_class($this); |
| 155 | 155 | if (property_exists($this, 'labelSingular')) { |
| 156 | 156 | $labelSingular = $this->labelSingular; |
| 157 | - } else { |
|
| 157 | + }else { |
|
| 158 | 158 | $labelSingular = Str::singular($classKey); |
| 159 | 159 | } |
| 160 | 160 | |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | $locale = app()->getLocale(); |
| 195 | 195 | } |
| 196 | 196 | try { |
| 197 | - $memoizedKey = $this->getMorphClass() . '-' . $this->id . '-' . $locale; |
|
| 197 | + $memoizedKey = $this->getMorphClass().'-'.$this->id.'-'.$locale; |
|
| 198 | 198 | |
| 199 | 199 | if (isset(static::$cachedUrls[$memoizedKey])) { |
| 200 | 200 | return static::$cachedUrls[$memoizedKey]; |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | return $this->url($locale); |
| 223 | 223 | } |
| 224 | 224 | |
| 225 | - return $this->url($locale) . '?preview-mode'; |
|
| 225 | + return $this->url($locale).'?preview-mode'; |
|
| 226 | 226 | } |
| 227 | 227 | |
| 228 | 228 | |
@@ -261,11 +261,11 @@ discard block |
||
| 261 | 261 | public function statusAsLabel() |
| 262 | 262 | { |
| 263 | 263 | if ($this->isPublished()) { |
| 264 | - return '<a href="' . $this->url() . '" target="_blank"><em>online</em></a>'; |
|
| 264 | + return '<a href="'.$this->url().'" target="_blank"><em>online</em></a>'; |
|
| 265 | 265 | } |
| 266 | 266 | |
| 267 | 267 | if ($this->isDraft()) { |
| 268 | - return '<a href="' . $this->previewUrl() . '" target="_blank" class="text-error"><em>offline</em></a>'; |
|
| 268 | + return '<a href="'.$this->previewUrl().'" target="_blank" class="text-error"><em>offline</em></a>'; |
|
| 269 | 269 | } |
| 270 | 270 | |
| 271 | 271 | if ($this->isArchived()) { |
@@ -40,9 +40,9 @@ |
||
| 40 | 40 | if ($request->filled('template')) { |
| 41 | 41 | $this->applyTemplate->handle( |
| 42 | 42 | FlatReferenceFactory::fromString($request->input('template'))->className(), |
| 43 | - (string) FlatReferenceFactory::fromString($request->input('template'))->id(), |
|
| 43 | + (string)FlatReferenceFactory::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 | |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | return; |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | - $availableApplicatorsString = implode(array_map(function ($applicator) { return get_class($applicator);}, $this->applicators), ','); |
|
| 39 | + $availableApplicatorsString = implode(array_map(function($applicator) { return get_class($applicator); }, $this->applicators), ','); |
|
| 40 | 40 | |
| 41 | 41 | throw new \RuntimeException("No proper template applicator found. $sourceClassName [$sourceId] cannot be applied as template. Available applicators: [$availableApplicatorsString]"); |
| 42 | 42 | } |
@@ -53,13 +53,13 @@ |
||
| 53 | 53 | |
| 54 | 54 | if ($child instanceof Module && $child->isPageSpecific()) { |
| 55 | 55 | $duplicatedChild = $child::create([ |
| 56 | - 'slug' => $targetModel->title ? $targetModel->title . '-' . $child->slug : $child->slug . '-copy', |
|
| 56 | + 'slug' => $targetModel->title ? $targetModel->title.'-'.$child->slug : $child->slug.'-copy', |
|
| 57 | 57 | 'owner_id' => $targetModel->id, |
| 58 | 58 | 'owner_type' => $targetModel->getMorphClass() |
| 59 | 59 | ]); |
| 60 | 60 | |
| 61 | 61 | $this->moduleTemplateApplicator->handle($child, $duplicatedChild); |
| 62 | - } else { |
|
| 62 | + }else { |
|
| 63 | 63 | $duplicatedChild = $child; |
| 64 | 64 | } |
| 65 | 65 | |