Skip to content

Commit 2b8aec6

Browse files
feat:[lar-102] fix php stan error
1 parent 385ccc8 commit 2b8aec6

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

app/Models/User.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public function getFilamentAvatarUrl(): ?string
193193
}
194194

195195
/**
196-
* @return array{name: string, username: string, picture: string}
196+
* @return array{name: string, username: string, picture: string|null}
197197
*/
198198
public function profile(): array
199199
{
@@ -353,7 +353,7 @@ public function hasPassword(): bool
353353
{
354354
$password = $this->getAuthPassword();
355355

356-
return ! empty($password) || $password !== null;
356+
return ! empty($password) || $password !== null; // @phpstan-ignore-line
357357
}
358358

359359
public function delete(): ?bool

app/Traits/FormatSocialAccount.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ public function formatTwitterHandle(?string $userSocial): ?string
6060

6161
private function trimAndRemovePrefix(string $url): string
6262
{
63-
$url = preg_replace('~https?://~', '', $url);
63+
$url = (string) preg_replace('~https?://~', '', $url);
6464

65-
return trim(preg_replace('~www\.~', '', $url));
65+
return trim((string) preg_replace('~www\.~', '', $url));
6666
}
6767
}

app/View/Components/SettingsLayout.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ final class SettingsLayout extends Component
1111
{
1212
public function render(): View
1313
{
14-
return view('layouts.settings');
14+
return view('layouts.settings'); // @phpstan-ignore-line
1515
}
1616
}

0 commit comments

Comments
 (0)