fix errors
continuous-integration/drone/push Build is passing Details

This commit is contained in:
philipp lang 2022-11-22 02:01:07 +01:00
parent fec30c9fa8
commit 491192bd3e
5 changed files with 3 additions and 23 deletions

View File

@ -1,19 +0,0 @@
<?php
namespace App\Member;
use Illuminate\Http\Resources\Json\JsonResource;
class GenderResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
return parent::toArray($request);
}
}

View File

@ -40,7 +40,7 @@ class MemberResource extends JsonResource
'subscription' => 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,

View File

@ -15,7 +15,7 @@ class NationalityResource extends JsonResource
*
* @param \Illuminate\Http\Request $request
*
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
* @return array<string, int|string>
*/
public function toArray($request)
{

View File

@ -15,7 +15,7 @@ class RegionResource extends JsonResource
*
* @param \Illuminate\Http\Request $request
*
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
* @return array<string, int|string>
*/
public function toArray($request)
{

View File

@ -144,7 +144,6 @@ class ShowTest extends TestCase
$this->assertInertiaHas([
'region' => ['name' => '-- kein --'],
'nationality' => ['name' => '-- kein --'],
'fullname' => 'Max Muster',
'nationality' => [
'name' => 'deutsch',