MinistryUser   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 4
Bugs 0 Features 2
Metric Value
eloc 10
c 4
b 0
f 2
dl 0
loc 13
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 11 1
1
<?php
2
3
namespace FaithGen\SDK\Http\Resources;
4
5
use FaithGen\SDK\Helpers\ImageHelper;
6
use Illuminate\Http\Resources\Json\JsonResource;
7
use InnoFlash\LaraStart\Helper;
8
9
class MinistryUser extends JsonResource
10
{
11
    public function toArray($request)
12
    {
13
        return [
14
            'id'       => $this->user_id,
0 ignored issues
show
Bug Best Practice introduced by
The property user_id does not exist on FaithGen\SDK\Http\Resources\MinistryUser. Since you implemented __get, consider adding a @property annotation.
Loading history...
15
            'active'   => (bool) $this->active,
0 ignored issues
show
Bug Best Practice introduced by
The property active does not exist on FaithGen\SDK\Http\Resources\MinistryUser. Since you implemented __get, consider adding a @property annotation.
Loading history...
16
            'name'     => $this->user->name,
0 ignored issues
show
Bug Best Practice introduced by
The property user does not exist on FaithGen\SDK\Http\Resources\MinistryUser. Since you implemented __get, consider adding a @property annotation.
Loading history...
17
            'email'    => $this->user->email,
18
            'phone'    => $this->user->phone,
19
            'provider' => $this->user->provider,
20
            'avatar'   => ImageHelper::getImage('users', $this->user->image, config('faithgen-sdk.users-server')),
21
            'joined'   => Helper::getDates($this->created_at),
0 ignored issues
show
Bug Best Practice introduced by
The property created_at does not exist on FaithGen\SDK\Http\Resources\MinistryUser. Since you implemented __get, consider adding a @property annotation.
Loading history...
22
        ];
23
    }
24
}
25