From 491192bd3e09a10f06f54eba52e9ead54761dca2 Mon Sep 17 00:00:00 2001 From: philipp lang Date: Tue, 22 Nov 2022 02:01:07 +0100 Subject: [PATCH] fix errors --- app/Member/GenderResource.php | 19 ------------------- app/Member/MemberResource.php | 2 +- app/Member/Resources/NationalityResource.php | 2 +- app/Member/Resources/RegionResource.php | 2 +- tests/Feature/Member/ShowTest.php | 1 - 5 files changed, 3 insertions(+), 23 deletions(-) delete mode 100644 app/Member/GenderResource.php diff --git a/app/Member/GenderResource.php b/app/Member/GenderResource.php deleted file mode 100644 index 9ed9944b..00000000 --- a/app/Member/GenderResource.php +++ /dev/null @@ -1,19 +0,0 @@ - new SubscriptionResource($this->whenLoaded('subscription')), 'gender_id' => $this->gender_id, 'gender_name' => $this->gender?->name ?: 'keine Angabe', - 'fullname' => ($this->gender ? $this->gender?->salutation.' ' : '').$this->fullname, + 'fullname' => ($this->gender ? $this->gender->salutation.' ' : '').$this->fullname, 'further_address' => $this->further_address, 'work_phone' => $this->work_phone, 'mobile_phone' => $this->mobile_phone, diff --git a/app/Member/Resources/NationalityResource.php b/app/Member/Resources/NationalityResource.php index 31d45330..bb62ec95 100644 --- a/app/Member/Resources/NationalityResource.php +++ b/app/Member/Resources/NationalityResource.php @@ -15,7 +15,7 @@ class NationalityResource extends JsonResource * * @param \Illuminate\Http\Request $request * - * @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable + * @return array */ public function toArray($request) { diff --git a/app/Member/Resources/RegionResource.php b/app/Member/Resources/RegionResource.php index ea3eeae6..661e6733 100644 --- a/app/Member/Resources/RegionResource.php +++ b/app/Member/Resources/RegionResource.php @@ -15,7 +15,7 @@ class RegionResource extends JsonResource * * @param \Illuminate\Http\Request $request * - * @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable + * @return array */ public function toArray($request) { diff --git a/tests/Feature/Member/ShowTest.php b/tests/Feature/Member/ShowTest.php index 4177c58d..eafb0800 100644 --- a/tests/Feature/Member/ShowTest.php +++ b/tests/Feature/Member/ShowTest.php @@ -144,7 +144,6 @@ class ShowTest extends TestCase $this->assertInertiaHas([ 'region' => ['name' => '-- kein --'], - 'nationality' => ['name' => '-- kein --'], 'fullname' => 'Max Muster', 'nationality' => [ 'name' => 'deutsch',