Skip to content

Commit 2018f4e

Browse files
aguingandgithub-actions[bot]
authored andcommitted
CS fix
1 parent f511add commit 2018f4e

File tree

321 files changed

+1194
-1496
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

321 files changed

+1194
-1496
lines changed

demo/app/Http/Middleware/PrefillLoginWithExampleCredentials.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ class PrefillLoginWithExampleCredentials
1414
*/
1515
public function handle(Request $request, Closure $next): Response
1616
{
17-
if($request->routeIs('code16.sharp.login')) {
17+
if ($request->routeIs('code16.sharp.login')) {
1818
Inertia::share([
1919
'prefill' => [
2020
'login' => '[email protected]',
2121
'password' => 'password',
2222
],
2323
]);
2424
}
25-
25+
2626
return $next($request);
2727
}
2828
}

demo/app/Providers/AppServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class AppServiceProvider extends ServiceProvider
1111
{
1212
public function register(): void
1313
{
14-
// $this->app->bind(SharpUploadModel::class, Media::class)
14+
// $this->app->bind(SharpUploadModel::class, Media::class)
1515

1616
$this->app->bind(SharpViteComponent::class, function () {
1717
return new SharpViteComponent(hotFile: base_path('../dist/hot'));

demo/app/Providers/DemoSharpServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ protected function configureSharp(SharpConfigBuilder $config): void
3333
->addEntity('test', TestEntity::class)
3434
->when(
3535
auth()->id() === 1,
36-
fn(SharpConfigBuilder $config) => $config->addGlobalFilter(DummyGlobalFilter::class)
36+
fn (SharpConfigBuilder $config) => $config->addGlobalFilter(DummyGlobalFilter::class)
3737
)
3838
->configureUploadsThumbnailCreation(uploadModelClass: Media::class)
3939
->setSharpMenu(SharpMenu::class)

demo/app/Sharp/Authors/Commands/InviteUserCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use Code16\Sharp\EntityList\Commands\EntityCommand;
66
use Code16\Sharp\Form\Fields\SharpFormTextField;
77
use Code16\Sharp\Utils\Fields\FieldsContainer;
8-
use Code16\Sharp\Utils\PageAlerts\PageAlert;
98

109
class InviteUserCommand extends EntityCommand
1110
{

demo/app/Sharp/Dashboard/DemoDashboard.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ class DemoDashboard extends SharpDashboard
3737
'#274754',
3838
'#e8c468',
3939
'#f4a462',
40-
// '#3B82F6',
41-
// '#064E3B',
42-
// '#EC4899',
43-
// '#78350F',
44-
// '#9CA3AF',
40+
// '#3B82F6',
41+
// '#064E3B',
42+
// '#EC4899',
43+
// '#78350F',
44+
// '#9CA3AF',
4545
];
4646
private static int $colorsIndex = 0;
4747

@@ -151,7 +151,7 @@ protected function buildWidgetsData(): void
151151
$this->setLineGraphDataSet();
152152
$this->setOrderedListDataSet();
153153
$this->setCustomPanelDataSet();
154-
154+
155155
$posts = DB::table('posts')
156156
->select(DB::raw('state, count(*) as count'))
157157
->groupBy('state')
@@ -217,9 +217,9 @@ protected function setPieGraphDataSet(): void
217217
'posts' => fn (Builder $query) => $query
218218
->whereBetween('published_at', [
219219
$this->getStartDate(),
220-
$this->getEndDate()
221-
])
222-
])
220+
$this->getEndDate(),
221+
]),
222+
])
223223
->limit(5)
224224
->orderBy('posts_count', 'desc')
225225
->get()
@@ -251,7 +251,7 @@ protected function setOrderedListDataSet(): void
251251
->addFilter(PeriodFilter::class, sprintf('%s..%s',
252252
$this->getStartDate()->format('Ymd'),
253253
$this->getEndDate()->format('Ymd'),
254-
))
254+
)),
255255
])
256256
->toArray()
257257
);

demo/app/Sharp/Posts/Blocks/AbstractPostBlockForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function buildFormLayout(FormLayout $formLayout): void
4545
->addColumn(6, function (FormLayoutColumn $column) {
4646
$column->withField('type')
4747
->when($this->getContentField(), fn ($column) => $column->withField('content'));
48-
48+
4949
$this->addAdditionalFieldsToLayout($column);
5050
});
5151
}

demo/app/Sharp/Posts/Blocks/PostBlockList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function buildListConfig(): void
3636
protected function getFilters(): ?array
3737
{
3838
return [
39-
HiddenFilter::make('post')
39+
HiddenFilter::make('post'),
4040
];
4141
}
4242

demo/app/Sharp/Posts/Commands/PreviewPostCommand.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@ public function label(): ?string
1111
{
1212
return 'Preview post';
1313
}
14-
15-
public function buildCommandConfig(): void
16-
{
17-
}
18-
14+
15+
public function buildCommandConfig(): void {}
16+
1917
public function execute(mixed $instanceId, array $data = []): array
2018
{
2119
return $this->view('sharp.post-preview', [

demo/app/Sharp/Posts/PostForm.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,14 @@ public function buildFormFields(FieldsContainer $formFields): void
141141
->allowEmptySearch()
142142
->setRemoteCallback(function ($search) {
143143
$users = User::orderBy('name')->limit(10);
144-
144+
145145
foreach (explode(' ', trim($search)) as $word) {
146146
$users->where(fn ($query) => $query
147147
->where('name', 'like', "%$word%")
148148
->orWhere('email', 'like', "%$word%")
149149
);
150150
}
151-
151+
152152
return $users->get();
153153
})
154154
->setListItemTemplate('<div>{{ $name }}</div><div><small>{{ $email }}</small></div>')

demo/app/Sharp/Posts/PostList.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use App\Sharp\Utils\Filters\StateFilter;
1515
use Code16\Sharp\EntityList\Fields\EntityListField;
1616
use Code16\Sharp\EntityList\Fields\EntityListFieldsContainer;
17-
use Code16\Sharp\EntityList\Fields\EntityListFilterField;
1817
use Code16\Sharp\EntityList\Fields\EntityListStateField;
1918
use Code16\Sharp\EntityList\SharpEntityList;
2019
use Code16\Sharp\Utils\Links\LinkToEntityList;
@@ -37,7 +36,7 @@ protected function buildList(EntityListFieldsContainer $fields): void
3736
->addField(
3837
EntityListField::make('title')
3938
->setLabel('Title')
40-
// ->setWidth(.2)
39+
// ->setWidth(.2)
4140
)
4241
->addField(
4342
EntityListStateField::make()
@@ -52,7 +51,7 @@ protected function buildList(EntityListFieldsContainer $fields): void
5251
->addField(
5352
EntityListField::make('categories')
5453
->setLabel('Categories')
55-
// ->setWidth(.2)
54+
// ->setWidth(.2)
5655
)
5756
->addField(
5857
EntityListField::make('published_at')
@@ -73,7 +72,7 @@ public function buildListConfig(): void
7372

7473
protected function buildPageAlert(PageAlert $pageAlert): void
7574
{
76-
if (!auth()->user()->isAdmin()) {
75+
if (! auth()->user()->isAdmin()) {
7776
$pageAlert
7877
->setMessage('As an editor, you can only edit your posts; you can see other posts except those which are still in draft.')
7978
->setLevelSecondary();
@@ -146,7 +145,7 @@ function (Builder $builder, $categories) {
146145
->each(function ($categoryId) use ($builder) {
147146
$builder->orWhereHas(
148147
'categories',
149-
fn(Builder $builder) => $builder->where('categories.id', $categoryId)
148+
fn (Builder $builder) => $builder->where('categories.id', $categoryId)
150149
);
151150
});
152151
});

0 commit comments

Comments
 (0)