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

PermissionResource::toArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
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