Skip to content

Commit 612041e

Browse files
authored
Run composer update and update model phpdocs (#2275)
1 parent 64bcdb5 commit 612041e

File tree

97 files changed

+1368
-966
lines changed

Some content is hidden

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

97 files changed

+1368
-966
lines changed

app/Filament/Admin/Pages/ListLogs.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@
1414
use Filament\Actions\Action;
1515
use Filament\Notifications\Notification;
1616
use Filament\Tables\Table;
17+
use Illuminate\Contracts\Support\Htmlable;
1718
use Illuminate\Support\Facades\Http;
1819

1920
class ListLogs extends BaseListLogs
2021
{
2122
protected string $view = 'filament.components.list-logs';
2223

23-
public function getHeading(): string|null|\Illuminate\Contracts\Support\Htmlable
24+
public function getHeading(): string|null|Htmlable
2425
{
2526
return trans('admin/log.navigation.panel_logs');
2627
}

app/Filament/Admin/Resources/Nodes/Pages/EditNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ protected function getDefaultTabs(): array
735735
$set('pulled', false);
736736
$set('uploaded', true);
737737

738-
} catch (\Exception $e) {
738+
} catch (Exception $e) {
739739
Notification::make()
740740
->title(trans('admin/node.diagnostics.upload_failed'))
741741
->body($e->getMessage())

app/Filament/Admin/Resources/Servers/Pages/EditServer.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,17 +150,17 @@ protected function getDefaultTabs(): array
150150

151151
try {
152152
if (!in_array(parse_url($state, PHP_URL_SCHEME), ['http', 'https'], true)) {
153-
throw new \Exception(trans('admin/egg.import.invalid_url'));
153+
throw new Exception(trans('admin/egg.import.invalid_url'));
154154
}
155155

156156
if (!filter_var($state, FILTER_VALIDATE_URL)) {
157-
throw new \Exception(trans('admin/egg.import.invalid_url'));
157+
throw new Exception(trans('admin/egg.import.invalid_url'));
158158
}
159159

160160
$extension = strtolower(pathinfo(parse_url($state, PHP_URL_PATH), PATHINFO_EXTENSION));
161161

162162
if (!array_key_exists($extension, Server::IMAGE_FORMATS)) {
163-
throw new \Exception(trans('admin/egg.import.unsupported_format', ['format' => implode(', ', array_keys(Server::IMAGE_FORMATS))]));
163+
throw new Exception(trans('admin/egg.import.unsupported_format', ['format' => implode(', ', array_keys(Server::IMAGE_FORMATS))]));
164164
}
165165

166166
$host = parse_url($state, PHP_URL_HOST);
@@ -169,14 +169,14 @@ protected function getDefaultTabs(): array
169169
if (
170170
filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) === false
171171
) {
172-
throw new \Exception(trans('admin/egg.import.no_local_ip'));
172+
throw new Exception(trans('admin/egg.import.no_local_ip'));
173173
}
174174

175175
$set('imageUrl', $state);
176176
$set('imageExtension', $extension);
177177
$set('image_url_error', null);
178178

179-
} catch (\Exception $e) {
179+
} catch (Exception $e) {
180180
$set('image_url_error', $e->getMessage());
181181
$set('imageUrl', null);
182182
$set('imageExtension', null);

app/Filament/Server/Pages/Settings.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,17 +118,17 @@ public function form(Schema $schema): Schema
118118

119119
try {
120120
if (!in_array(parse_url($state, PHP_URL_SCHEME), ['http', 'https'], true)) {
121-
throw new \Exception(trans('admin/egg.import.invalid_url'));
121+
throw new Exception(trans('admin/egg.import.invalid_url'));
122122
}
123123

124124
if (!filter_var($state, FILTER_VALIDATE_URL)) {
125-
throw new \Exception(trans('admin/egg.import.invalid_url'));
125+
throw new Exception(trans('admin/egg.import.invalid_url'));
126126
}
127127

128128
$extension = strtolower(pathinfo(parse_url($state, PHP_URL_PATH), PATHINFO_EXTENSION));
129129

130130
if (!array_key_exists($extension, Server::IMAGE_FORMATS)) {
131-
throw new \Exception(trans('admin/egg.import.unsupported_format', ['format' => implode(', ', array_keys(Server::IMAGE_FORMATS))]));
131+
throw new Exception(trans('admin/egg.import.unsupported_format', ['format' => implode(', ', array_keys(Server::IMAGE_FORMATS))]));
132132
}
133133

134134
$host = parse_url($state, PHP_URL_HOST);
@@ -137,14 +137,14 @@ public function form(Schema $schema): Schema
137137
if (
138138
filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) === false
139139
) {
140-
throw new \Exception(trans('admin/egg.import.no_local_ip'));
140+
throw new Exception(trans('admin/egg.import.no_local_ip'));
141141
}
142142

143143
$set('imageUrl', $state);
144144
$set('imageExtension', $extension);
145145
$set('image_url_error', null);
146146

147-
} catch (\Exception $e) {
147+
} catch (Exception $e) {
148148
$set('image_url_error', $e->getMessage());
149149
$set('imageUrl', null);
150150
$set('imageExtension', null);

app/Filament/Server/Resources/Activities/ActivityResource.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ public static function defaultTable(Table $table): Table
139139
]);
140140
}
141141

142+
/** @return Builder<ActivityLog> */
142143
public static function getEloquentQuery(): Builder
143144
{
144145
/** @var Server $server */

app/Filament/Server/Resources/Files/Pages/EditFiles.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,9 @@ private function getDaemonFileRepository(): DaemonFileRepository
259259
return $this->fileRepository;
260260
}
261261

262-
public static function getUrl(array $parameters = [], bool $isAbsolute = true, ?string $panel = null, ?Model $tenant = null, bool $shouldGuessMissingParameters = false): string
262+
public static function getUrl(array $parameters = [], bool $isAbsolute = true, ?string $panel = null, ?Model $tenant = null, bool $shouldGuessMissingParameters = false, ?string $configuration = null): string
263263
{
264-
return parent::getUrl($parameters, $isAbsolute, $panel, $tenant) . '/';
264+
return parent::getUrl($parameters, $isAbsolute, $panel, $tenant, $shouldGuessMissingParameters, $configuration) . '/';
265265
}
266266

267267
public static function route(string $path): PageRegistration

app/Http/Middleware/RequireTwoFactorAuthentication.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class RequireTwoFactorAuthentication
2323
* order to perform actions. If so, we check the level at which it is required (all users
2424
* or just admins) and then check if the user has enabled it for their account.
2525
*
26-
* @throws \App\Exceptions\Http\TwoFactorAuthRequiredException
26+
* @throws TwoFactorAuthRequiredException
2727
*/
2828
public function handle(Request $request, \Closure $next): mixed
2929
{

app/Http/Requests/Api/Application/ApplicationApiRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function parameter(string $key, string $expect)
8787
$value = $this->route()->parameter($key);
8888

8989
Assert::isInstanceOf($value, $expect);
90-
Assert::isInstanceOf($value, Model::class);
90+
Assert::isInstanceOf($value, Model::class); // @phpstan-ignore staticMethod.alreadyNarrowedType
9191
Assert::true($value->exists);
9292

9393
/* @var T $value */

app/Livewire/NodeClientConnectivity.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use App\Services\Servers\GetUserPermissionsService;
99
use Filament\Support\Enums\IconSize;
1010
use Filament\Tables\View\Components\Columns\IconColumnComponent\IconComponent;
11+
use Illuminate\Contracts\View\View;
1112
use Illuminate\Support\Facades\Auth;
1213
use Illuminate\View\ComponentAttributeBag;
1314
use Livewire\Attributes\Locked;
@@ -30,7 +31,7 @@ public function boot(GetUserPermissionsService $getUserPermissionsService, NodeJ
3031
$this->nodeJWTService = $nodeJWTService;
3132
}
3233

33-
public function render(): \Illuminate\Contracts\View\View
34+
public function render(): View
3435
{
3536
$httpUrl = $this->node->getConnectionAddress();
3637

app/Models/ActivityLog.php

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use App\Events\ActivityLogged;
77
use App\Traits\HasValidation;
88
use BackedEnum;
9-
use Carbon\Carbon;
109
use Filament\Facades\Filament;
1110
use Filament\Support\Contracts\HasIcon;
1211
use Filament\Support\Contracts\HasLabel;
@@ -17,6 +16,7 @@
1716
use Illuminate\Database\Eloquent\Relations\HasOne;
1817
use Illuminate\Database\Eloquent\Relations\MorphTo;
1918
use Illuminate\Support\Arr;
19+
use Illuminate\Support\Carbon;
2020
use Illuminate\Support\Collection;
2121
use Illuminate\Support\Facades\Event;
2222
use Illuminate\Support\Str;
@@ -31,28 +31,28 @@
3131
* @property string|null $description
3232
* @property string|null $actor_type
3333
* @property int|null $actor_id
34+
* @property Collection<array-key, mixed> $properties
35+
* @property Carbon $timestamp
3436
* @property int|null $api_key_id
35-
* @property Collection|null $properties
36-
* @property \Carbon\Carbon $timestamp
37-
* @property Model|\Eloquent $actor
38-
* @property \Illuminate\Database\Eloquent\Collection|ActivityLogSubject[] $subjects
39-
* @property int|null $subjects_count
40-
* @property ApiKey|null $apiKey
37+
* @property-read Model|\Eloquent|null $actor
38+
* @property-read ApiKey|null $apiKey
39+
* @property-read \Illuminate\Database\Eloquent\Collection<int, ActivityLogSubject> $subjects
40+
* @property-read int|null $subjects_count
4141
*
42-
* @method static Builder|ActivityLog forActor(Model $actor)
43-
* @method static Builder|ActivityLog forEvent(string $action)
44-
* @method static Builder|ActivityLog newModelQuery()
45-
* @method static Builder|ActivityLog newQuery()
46-
* @method static Builder|ActivityLog query()
47-
* @method static Builder|ActivityLog whereActorId($value)
48-
* @method static Builder|ActivityLog whereActorType($value)
49-
* @method static Builder|ActivityLog whereApiKeyId($value)
50-
* @method static Builder|ActivityLog whereDescription($value)
51-
* @method static Builder|ActivityLog whereEvent($value)
52-
* @method static Builder|ActivityLog whereId($value)
53-
* @method static Builder|ActivityLog whereIp($value)
54-
* @method static Builder|ActivityLog whereProperties($value)
55-
* @method static Builder|ActivityLog whereTimestamp($value)
42+
* @method static Builder<static>|ActivityLog forActor(\Illuminate\Database\Eloquent\Model $actor)
43+
* @method static Builder<static>|ActivityLog forEvent(string $action)
44+
* @method static Builder<static>|ActivityLog newModelQuery()
45+
* @method static Builder<static>|ActivityLog newQuery()
46+
* @method static Builder<static>|ActivityLog query()
47+
* @method static Builder<static>|ActivityLog whereActorId($value)
48+
* @method static Builder<static>|ActivityLog whereActorType($value)
49+
* @method static Builder<static>|ActivityLog whereApiKeyId($value)
50+
* @method static Builder<static>|ActivityLog whereDescription($value)
51+
* @method static Builder<static>|ActivityLog whereEvent($value)
52+
* @method static Builder<static>|ActivityLog whereId($value)
53+
* @method static Builder<static>|ActivityLog whereIp($value)
54+
* @method static Builder<static>|ActivityLog whereProperties($value)
55+
* @method static Builder<static>|ActivityLog whereTimestamp($value)
5656
*/
5757
class ActivityLog extends Model implements HasIcon, HasLabel
5858
{

0 commit comments

Comments
 (0)