Skip to content

Commit 521abbd

Browse files
committed
fix types
1 parent 17ab425 commit 521abbd

36 files changed

+199
-18
lines changed

app/Web/Pages/Settings/Users/Index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ protected function getHeaderActions(): array
6161
->rules($rules['password']),
6262
Select::make('role')
6363
->rules($rules['role'])
64-
->options(collect(config('core.user_roles'))->mapWithKeys(fn ($role) => [$role => $role])),
64+
->options(collect((array) config('core.user_roles'))->mapWithKeys(fn ($role) => [$role => $role])),
6565
])
6666
->columns(1);
6767
})

app/Web/Pages/Settings/Users/Widgets/UsersList.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,11 @@
2222

2323
class UsersList extends Widget
2424
{
25+
/**
26+
* @var array<string>
27+
*/
2528
protected $listeners = ['$refresh'];
2629

27-
protected function getTableQuery(): Builder
28-
{
29-
return User::query();
30-
}
31-
3230
protected function getTableColumns(): array
3331
{
3432
return [
@@ -52,7 +50,7 @@ public function table(Table $table): Table
5250
{
5351
return $table
5452
->heading(null)
55-
->query($this->getTableQuery())
53+
->query(User::query())
5654
->columns($this->getTableColumns())
5755
->actions([
5856
EditAction::make('edit')
@@ -76,7 +74,7 @@ public function table(Table $table): Table
7674
->rules(UpdateUser::rules($record)['timezone']),
7775
Select::make('role')
7876
->options(
79-
collect(config('core.user_roles'))
77+
collect((array) config('core.user_roles'))
8078
->mapWithKeys(fn ($role) => [$role => $role])
8179
)
8280
->rules(UpdateUser::rules($record)['role']),

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"mockery/mockery": "^1.4.4",
3232
"nunomaduro/collision": "^8.1",
3333
"phpunit/phpunit": "^10.0",
34+
"rector/rector": "^2.0",
3435
"spatie/laravel-ignition": "^2.0"
3536
},
3637
"autoload": {

composer.lock

Lines changed: 60 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/core.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@
490490
*/
491491
'restricted_ip_addresses' => array_merge(
492492
['127.0.0.1', 'localhost', '0.0.0.0'],
493-
explode(',', env('RESTRICTED_IP_ADDRESSES', ''))
493+
explode(',', (string) env('RESTRICTED_IP_ADDRESSES', ''))
494494
),
495495

496496
/*

database/factories/BackupFactory.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
use App\Enums\BackupStatus;
66
use Illuminate\Database\Eloquent\Factories\Factory;
77

8+
/**
9+
* @extends Factory<\App\Models\Backup>
10+
*/
811
class BackupFactory extends Factory
912
{
1013
public function definition(): array

database/factories/BackupFileFactory.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
use Illuminate\Database\Eloquent\Factories\Factory;
66

7+
/**
8+
* @extends Factory<\App\Models\BackupFile>
9+
*/
710
class BackupFileFactory extends Factory
811
{
912
public function definition(): array

database/factories/CommandExecutionFactory.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
use App\Models\CommandExecution;
88
use Illuminate\Database\Eloquent\Factories\Factory;
99

10+
/**
11+
* @extends Factory<\App\Models\CommandExecution>
12+
*/
1013
class CommandExecutionFactory extends Factory
1114
{
1215
protected $model = CommandExecution::class;

database/factories/CommandFactory.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
use Illuminate\Database\Eloquent\Factories\Factory;
88
use Illuminate\Support\Carbon;
99

10+
/**
11+
* @extends Factory<\App\Models\Command>
12+
*/
1013
class CommandFactory extends Factory
1114
{
1215
protected $model = Command::class;

database/factories/CronJobFactory.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
use App\Models\CronJob;
77
use Illuminate\Database\Eloquent\Factories\Factory;
88

9+
/**
10+
* @extends Factory<\App\Models\CronJob>
11+
*/
912
class CronJobFactory extends Factory
1013
{
1114
protected $model = CronJob::class;

0 commit comments

Comments
 (0)