Skip to content

Commit 4a860ea

Browse files
chore(deps): lock file maintenance (#2587)
* chore(deps): lock file maintenance * fix: resolve static analysis issues --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Ned Zimmerman <[email protected]>
1 parent ff08153 commit 4a860ea

File tree

7 files changed

+1687
-1428
lines changed

7 files changed

+1687
-1428
lines changed

app/Models/Invitation.php

+2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ protected static function newFactory(): Factory
2828
return InvitationFactory::new();
2929
}
3030

31+
/** @return MorphTo<Organization|RegulatedOrganization|Engagement, $this> */
3132
public function invitationable(): MorphTo
3233
{
34+
/** @var MorphTo<Organization|RegulatedOrganization|Engagement, $this> */
3335
return $this->morphTo();
3436
}
3537

app/Models/Project.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,11 @@ public function matchingStrategy(): MorphOne
336336
return $this->morphOne(MatchingStrategy::class, 'matchable');
337337
}
338338

339+
/** @return MorphTo<Organization|RegulatedOrganization, $this> */
339340
public function projectable(): MorphTo
340341
{
341-
return $this->morphTo(__FUNCTION__, 'projectable_type', 'projectable_id');
342+
/** @var MorphTo<Organization|RegulatedOrganization, $this> */
343+
return $this->morphTo();
342344
}
343345

344346
public function scopeStatuses($query, $statuses)

app/Models/User.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ public function isOnlyAdministratorOfRegulatedOrganization(): bool
410410

411411
public function twoFactorAuthEnabled(): bool
412412
{
413-
return ! is_null($this->two_factor_secret);
413+
return ! is_null($this->two_factor_secret ?? null);
414414
}
415415

416416
public function isAdministrator(): bool

app/Traits/HasMembers.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
namespace App\Traits;
44

55
use App\Models\User;
6+
use Illuminate\Database\Eloquent\Relations\MorphPivot;
67
use Illuminate\Database\Eloquent\Relations\MorphToMany;
78

89
trait HasMembers
910
{
1011
/**
1112
* Get all the members of the model.
1213
*
13-
* @return MorphToMany<User, $this>
14+
* @return MorphToMany<User, $this, MorphPivot, 'membership'>
1415
*/
1516
public function users(): MorphToMany
1617
{
@@ -23,7 +24,7 @@ public function users(): MorphToMany
2324
/**
2425
* Get all the administrators of the model.
2526
*
26-
* @return MorphToMany<User, $this>
27+
* @return MorphToMany<User, $this, MorphPivot, 'membership'>
2728
*/
2829
public function administrators(): MorphToMany
2930
{

app/View/Components/Notification/ParticipantInvited.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace App\View\Components\Notification;
44

5+
use App\Models\Engagement;
56
use App\Models\Invitation;
67
use App\Models\Organization;
78
use App\Models\Project;
@@ -15,7 +16,7 @@ class ParticipantInvited extends Notification
1516
{
1617
public Invitation $invitation;
1718

18-
public mixed $invitationable;
19+
public Engagement $invitationable;
1920

2021
public function __construct(DatabaseNotification $notification)
2122
{

0 commit comments

Comments
 (0)