Completed
Push — master ( bc69cb...e24ad8 )
by Ron
02:35
created

GalaxyResource::toArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 1
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\Http\Resources;
4
5
use Illuminate\Http\Resources\Json\JsonResource;
6
7
class GalaxyResource extends JsonResource
8
{
9
    /**
10
     * @param \Illuminate\Http\Request $request
11
     * @return array
12
     */
13
    public function toArray($request)
14
    {
15
        return [
16
            'galaxy_id' => $this->id,
0 ignored issues
show
Bug Best Practice introduced by
The property id does not exist on App\Http\Resources\GalaxyResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
17
            'galaxy_type_id' => $this->galaxy_type_id,
0 ignored issues
show
Bug Best Practice introduced by
The property galaxy_type_id does not exist on App\Http\Resources\GalaxyResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
18
            'name' => $this->display_name,
0 ignored issues
show
Bug Best Practice introduced by
The property display_name does not exist on App\Http\Resources\GalaxyResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
19
            'updated_at' => $this->updated_at,
0 ignored issues
show
Bug Best Practice introduced by
The property updated_at does not exist on App\Http\Resources\GalaxyResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
20
        ];
21
    }
22
}