Skip to content

Commit 4bd122e

Browse files
atmonshigithub-actions[bot]
authored andcommitted
Fix styling
1 parent 9d2a56b commit 4bd122e

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

src/Concerns/Schemata.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public static function getTabsSchema(): array
214214
TextInput::make('slug')->required()->maxLength(255)->label(__('slug')),
215215
])
216216
->createOptionAction(fn (Action $action) => $action->hidden(auth()->user()->cannot('create', BoltPlugin::getModel('Category'))))
217-
->getOptionLabelFromRecordUsing(fn (?Category $record, $livewire) => $record?->getTranslation('name',$livewire->activeLocale) ?? $record->name),
217+
->getOptionLabelFromRecordUsing(fn (?Category $record, $livewire) => $record?->getTranslation('name', $livewire->activeLocale) ?? $record->name),
218218
]),
219219

220220
Tabs\Tab::make('text-details-tab')

src/Models/Collection.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@
1919
class Collection extends Model
2020
{
2121
use HasFactory;
22+
use HasTranslations;
2223
use HasUpdates;
2324
use SoftDeletes;
24-
use HasTranslations;
2525

2626
protected $guarded = [];
2727

2828
public array $translatable = ['name', 'values'];
2929

3030
public function getTable(): string
3131
{
32-
return config('zeus-bolt.table-prefix').'collections';
32+
return config('zeus-bolt.table-prefix') . 'collections';
3333
}
3434

3535
public function getValuesListAttribute(): ?string
@@ -51,7 +51,7 @@ public function getValuesListAttribute(): ?string
5151
protected function name(): Attribute
5252
{
5353
return Attribute::make(
54-
get: fn($value) => (filled($value))
54+
get: fn ($value) => (filled($value))
5555
? $value
5656
: $this->getRawOriginal('name'),
5757
);
@@ -61,7 +61,6 @@ protected function name(): Attribute
6161
* Returns the values as a collection. Translatable variables are always cast as an array.
6262
* This function transforms it to a collection.
6363
*
64-
* @return Attribute
6564
* @throws \JsonException
6665
*/
6766
protected function values(): Attribute
@@ -77,6 +76,7 @@ protected function values(): Attribute
7776
if (is_array($value)) {
7877
$value = collect($value);
7978
}
79+
8080
return $value;
8181
},
8282
);

tests/FormsTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
use function Pest\Livewire\livewire;
1717

1818
it('can render Form List', function () {
19-
get(FormResource::getUrl())->assertSuccessful();
20-
});
19+
get(FormResource::getUrl())->assertSuccessful();
20+
});
2121

2222
it('can render list Forms', function () {
23-
get('/bolt')->assertSuccessful();
24-
});
23+
get('/bolt')->assertSuccessful();
24+
});
2525

2626
it('can render show Form', function () {
2727
$form = Form::factory()->create();
@@ -109,8 +109,8 @@
109109
});
110110

111111
it('can render create form page', function () {
112-
get(FormResource::getUrl('create'))->assertSuccessful();
113-
});
112+
get(FormResource::getUrl('create'))->assertSuccessful();
113+
});
114114

115115
it('can create', function () {
116116
$newData = Form::factory()->make();
@@ -199,10 +199,10 @@
199199
})->skip();
200200

201201
it('can not edit', function () {
202-
get(CategoryResource::getUrl('edit', [
203-
'record' => Category::factory()->create(),
204-
]))->assertSuccessful();
205-
});
202+
get(CategoryResource::getUrl('edit', [
203+
'record' => Category::factory()->create(),
204+
]))->assertSuccessful();
205+
});
206206

207207
it('can retrieve data', function () {
208208
$post = Form::factory()->create();

tests/ResourcesTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@
77
use function Pest\Laravel\get;
88

99
it('can render category list', function () {
10-
get(CategoryResource::getUrl())
11-
->assertSuccessful();
12-
});
10+
get(CategoryResource::getUrl())
11+
->assertSuccessful();
12+
});
1313

1414
it('can render collection list', function () {
15-
get(CollectionResource::getUrl())
16-
->assertSuccessful();
17-
});
15+
get(CollectionResource::getUrl())
16+
->assertSuccessful();
17+
});
1818

1919
it('can render form list', function () {
20-
get(FormResource::getUrl())
21-
->assertSuccessful();
22-
});
20+
get(FormResource::getUrl())
21+
->assertSuccessful();
22+
});

0 commit comments

Comments
 (0)