Passed
Push — master ( f51c1b...16736d )
by Arthur
05:36
created

PermissionResource   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 4 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: arthur
5
 * Date: 15.10.18
6
 * Time: 23:21.
7
 */
8
9
namespace Modules\Authorization\Resources;
10
11
use Illuminate\Http\Resources\Json\JsonResource;
12
13
class PermissionResource extends JsonResource
14
{
15
    /**
16
     * Transform the resource into an array.
17
     *
18
     * @param \Illuminate\Http\Request $request
19
     *
20
     * @return array
21
     */
22
    public function toArray($request)
23
    {
24
        return [
25
            'name'  => $this->name
0 ignored issues
show
Bug Best Practice introduced by
The property name does not exist on Modules\Authorization\Resources\PermissionResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
26
        ];
27
    }
28
}
29