| @@ -38,8 +38,9 @@ | ||
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | if ($invitation->post_id) { |
| 41 | 41 | $space = BaseSpace::withoutGlobalScopes()->find($invitation->post_id); |
| 42 | + /** @var BaseSpace|null $space */ | |
| 42 | 43 | if ($space) { |
| 43 | 44 | $role = 'member'; |
| 44 | 45 | if ($space->type == 'course') { |
| 45 | 46 | $role = 'student'; |
| @@ -131,8 +132,9 @@ | ||
| 131 | 132 | |
| 132 | 133 | $space = null; |
| 133 | 134 | if ($invitation->post_id) { |
| 134 | 135 | $space = BaseSpace::withoutGlobalScopes()->find($invitation->post_id); |
| 136 | + /** @var BaseSpace|null $space */ | |
| 135 | 137 | if ($space) { |
| 136 | 138 | $role = 'member'; |
| 137 | 139 | if ($space->type == 'course') { |
| 138 | 140 | $role = 'student'; |