@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | { |
| 16 | 16 | public function openDraftable(array $options, Model $subject) : string |
| 17 | 17 | { |
| 18 | - $identifier = short_class_name($subject) . '_' . ($subject->isDraft() ? 'new' : $subject->id); |
|
| 18 | + $identifier = short_class_name($subject).'_'.($subject->isDraft() ? 'new' : $subject->id); |
|
| 19 | 19 | |
| 20 | 20 | $options = array_merge($options, [ |
| 21 | 21 | 'data-autosave' => '', |
@@ -32,12 +32,12 @@ discard block |
||
| 32 | 32 | $formOptions['data-confirm'] = 'true'; |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | - return $this->open($formOptions) . substr(el('button', $buttonOptions, ''), 0, -strlen('</button>')); |
|
| 35 | + return $this->open($formOptions).substr(el('button', $buttonOptions, ''), 0, -strlen('</button>')); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | public function closeButton() : string |
| 39 | 39 | { |
| 40 | - return '</button>' . $this->close(); |
|
| 40 | + return '</button>'.$this->close(); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | public function redactor($subject, string $fieldName, string $locale = '', array $options = []) : string |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | return el('label.-checkbox', |
| 65 | 65 | $this->checkbox($fieldName, 1, $this->useInitialValue($subject, $fieldName), $options) |
| 66 | - . ' ' . $label |
|
| 66 | + . ' '.$label |
|
| 67 | 67 | ); |
| 68 | 68 | } |
| 69 | 69 | |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | |
| 100 | 100 | public function locales(array $locales, string $current) : string |
| 101 | 101 | { |
| 102 | - $list = array_reduce($locales, function (array $list, string $locale) { |
|
| 102 | + $list = array_reduce($locales, function(array $list, string $locale) { |
|
| 103 | 103 | $list[$locale] = trans("locales.{$locale}"); |
| 104 | 104 | return $list; |
| 105 | 105 | }, []); |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | public function getLabelForTranslatedField(string $fieldName, string $label, string $locale) : string |
| 158 | 158 | { |
| 159 | 159 | return HTML::decode( |
| 160 | - $this->label($fieldName, $label . el('span.label_lang', $locale)) |
|
| 160 | + $this->label($fieldName, $label.el('span.label_lang', $locale)) |
|
| 161 | 161 | ); |
| 162 | 162 | } |
| 163 | 163 | } |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | [ |
| 68 | 68 | 'class' => 'button -danger -small', |
| 69 | 69 | ] |
| 70 | - ) . el('span.fa.fa-remove') . Form::closeButton(); |
|
| 70 | + ).el('span.fa.fa-remove').Form::closeButton(); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | public function onlineIndicator(bool $online) : string |
@@ -10,32 +10,32 @@ discard block |
||
| 10 | 10 | { |
| 11 | 11 | public function register() |
| 12 | 12 | { |
| 13 | - Menu::macro('back', function () { |
|
| 13 | + Menu::macro('back', function() { |
|
| 14 | 14 | return Menu::new() |
| 15 | 15 | ->setActiveClass('-active') |
| 16 | 16 | ->setActiveFromRequest('/blender'); |
| 17 | 17 | }); |
| 18 | 18 | |
| 19 | - Menu::macro('moduleGroup', function ($title) { |
|
| 19 | + Menu::macro('moduleGroup', function($title) { |
|
| 20 | 20 | return Menu::back() |
| 21 | 21 | ->addParentClass('menu_group') |
| 22 | 22 | ->setParentAttribute('data-menu-group', fragment("back.nav.{$title}")) |
| 23 | - ->registerFilter(function (Link $link) { |
|
| 23 | + ->registerFilter(function(Link $link) { |
|
| 24 | 24 | $link->addParentClass('menu_group_item'); |
| 25 | 25 | }); |
| 26 | 26 | }); |
| 27 | 27 | |
| 28 | - Menu::macro('startSecondary', function () { |
|
| 29 | - return $this->registerFilter(function (Link $link) { |
|
| 28 | + Menu::macro('startSecondary', function() { |
|
| 29 | + return $this->registerFilter(function(Link $link) { |
|
| 30 | 30 | $link->addParentClass('-secondary'); |
| 31 | 31 | }); |
| 32 | 32 | }); |
| 33 | 33 | |
| 34 | - Menu::macro('module', function (string $action, string $name) { |
|
| 34 | + Menu::macro('module', function(string $action, string $name) { |
|
| 35 | 35 | return $this->action("Back\\{$action}", fragment("back.{$name}")); |
| 36 | 36 | }); |
| 37 | 37 | |
| 38 | - Menu::macro('backMain', function () { |
|
| 38 | + Menu::macro('backMain', function() { |
|
| 39 | 39 | return Menu::back() |
| 40 | 40 | ->addClass('menu_groups') |
| 41 | 41 | ->setAttribute('data-menu-groups') |
@@ -67,9 +67,9 @@ discard block |
||
| 67 | 67 | ); |
| 68 | 68 | }); |
| 69 | 69 | |
| 70 | - Menu::macro('backUser', function () { |
|
| 70 | + Menu::macro('backUser', function() { |
|
| 71 | 71 | |
| 72 | - $avatar = HTML::avatar(current_user(), '-small') . |
|
| 72 | + $avatar = HTML::avatar(current_user(), '-small'). |
|
| 73 | 73 | el('span.:response-desktop-only', current_user()->email); |
| 74 | 74 | |
| 75 | 75 | return Menu::new() |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | { |
| 7 | 7 | public static function bootHasUrl() |
| 8 | 8 | { |
| 9 | - static::saving(function ($model) { |
|
| 9 | + static::saving(function($model) { |
|
| 10 | 10 | |
| 11 | 11 | if (!in_array('name', $model->translatable ?? [])) { |
| 12 | 12 | $model->url = str_slug($model->name); |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | public static function findByNameOrCreate(string $name, TagType $type) : Tag |
| 35 | 35 | { |
| 36 | 36 | $existing = Tag::nonDraft()->get() |
| 37 | - ->first(function (Tag $tag) use ($name) { |
|
| 37 | + ->first(function(Tag $tag) use ($name) { |
|
| 38 | 38 | return $tag->translate('name', content_locale()) === $name; |
| 39 | 39 | }); |
| 40 | 40 | |