Skip to content

Commit 02a42dc

Browse files
tabunagithub-actions[bot]
authored andcommitted
Fixed code style
1 parent ff0d27e commit 02a42dc

File tree

5 files changed

+12
-21
lines changed

5 files changed

+12
-21
lines changed

src/Platform/Actions/CreateAdminUser.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
namespace Orchid\Platform\Actions;
44

55
use Illuminate\Console\Command;
6-
use Orchid\Platform\Models\User;
7-
use Orchid\Support\Facades\Dashboard;
86
use Illuminate\Support\Collection;
97
use Illuminate\Support\Facades\Hash;
8+
use Orchid\Platform\Models\User;
9+
use Orchid\Support\Facades\Dashboard;
1010

1111
class CreateAdminUser
1212
{
@@ -35,7 +35,7 @@ protected function updateUser(string $id, Collection $attributes): void
3535
* Prepare user attributes before creating or updating.
3636
* If a console command is provided, it will prompt the user for missing attributes.
3737
*
38-
* @param Collection $attributes The provided attributes.
38+
* @param Collection $attributes The provided attributes.
3939
*
4040
* @return Collection The prepared attributes.
4141
*/
@@ -49,7 +49,7 @@ public function prepare(Collection $attributes): Collection
4949
]);
5050
}
5151

52-
if (!$attributes->has('permissions')) {
52+
if (! $attributes->has('permissions')) {
5353
$attributes->put('permissions', Dashboard::getAllowAllPermission());
5454
}
5555

src/Platform/Actions/UpdateAdminUser.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
namespace Orchid\Platform\Actions;
44

55
use Illuminate\Console\Command;
6-
use Orchid\Platform\Models\User;
7-
use Orchid\Support\Facades\Dashboard;
86
use Illuminate\Support\Collection;
97
use Illuminate\Support\Facades\Hash;
8+
use Orchid\Platform\Models\User;
9+
use Orchid\Support\Facades\Dashboard;
1010

1111
class UpdateAdminUser
1212
{
@@ -19,7 +19,7 @@ public function __construct(protected Command $command) {}
1919
* Prepare user attributes before creating or updating.
2020
* If a console command is provided, it will prompt the user for missing attributes.
2121
*
22-
* @param Collection $attributes The provided attributes.
22+
* @param Collection $attributes The provided attributes.
2323
*
2424
* @return Collection The prepared attributes.
2525
*/
@@ -33,7 +33,7 @@ public function prepare(Collection $attributes): Collection
3333
]);
3434
}
3535

36-
if (!$attributes->has('permissions')) {
36+
if (! $attributes->has('permissions')) {
3737
$attributes->put('permissions', Dashboard::getAllowAllPermission());
3838
}
3939

src/Platform/Commands/OrchidUserCommand.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Orchid\Platform\Commands;
44

5-
use Exception;
65
use Illuminate\Console\Command;
76
use Illuminate\Support\Collection;
87
use Illuminate\Support\Str;
@@ -28,7 +27,6 @@ public function handle(): void
2827
{
2928
$userId = $this->option('id');
3029

31-
3230
if ($userId) {
3331
/** @var UpdateAdminUser $service */
3432
$service = app(config('orchid.adminTerminalCreator', UpdateAdminUser::class), [
@@ -41,7 +39,6 @@ public function handle(): void
4139
]);
4240
}
4341

44-
4542
try {
4643
$arguments = $service->prepare(
4744
$this->parseArguments(),
@@ -59,21 +56,20 @@ public function handle(): void
5956
}
6057
}
6158

62-
6359
/**
6460
* Обрабатывает вводимые данные.
6561
*/
6662
private function parseArguments(): Collection
6763
{
6864
return collect($this->argument('arguments'))
69-
->map(fn(string $arg) => Str::of($arg))
65+
->map(fn (string $arg) => Str::of($arg))
7066
->mapWithKeys(function (Stringable $arg) {
7167

72-
if(!$arg->contains('=')) {
73-
return[ $arg->toString() => null ];
68+
if (! $arg->contains('=')) {
69+
return [$arg->toString() => null];
7470
}
7571

76-
$explode = $arg->explode('=', 2);
72+
$explode = $arg->explode('=', 2);
7773

7874
return [$explode[0] => $explode[1]];
7975
});

src/Platform/Models/User.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use Illuminate\Database\Eloquent\Factories\HasFactory;
99
use Illuminate\Foundation\Auth\User as Authenticatable;
1010
use Illuminate\Notifications\Notifiable;
11-
use Illuminate\Support\Facades\Hash;
1211
use Orchid\Access\UserAccess;
1312
use Orchid\Access\UserInterface;
1413
use Orchid\Filters\Filterable;
@@ -17,7 +16,6 @@
1716
use Orchid\Filters\Types\WhereDateStartEnd;
1817
use Orchid\Metrics\Chartable;
1918
use Orchid\Screen\AsSource;
20-
use Orchid\Support\Facades\Dashboard;
2119

2220
/**
2321
* This class serves as a base model for system users and is not intended

src/Screen/Field.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ public function render()
208208
->markFieldWithError()
209209
->generateId();
210210

211-
212211
$slot = view($this->view, array_merge($this->getAttributes(), [
213212
'attributes' => $this->getAllowAttributes(),
214213
'dataAttributes' => $this->getAllowDataAttributes(),
@@ -217,7 +216,6 @@ public function render()
217216
]))
218217
->withErrors($this->getErrorsMessage());
219218

220-
221219
if ($this->typeForm) {
222220
return view($this->typeForm, [
223221
'slot' => $slot,
@@ -226,7 +224,6 @@ public function render()
226224
->withErrors($this->getErrorsMessage());
227225
}
228226

229-
230227
return $slot;
231228

232229
return view($this->view, array_merge($this->getAttributes(), [

0 commit comments

Comments
 (0)