Passed
Push — master ( 4b0d05...471523 )
by Arthur
103:49 queued 98:11
created

PermissionTransformer::toArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
ccs 0
cts 4
cp 0
crap 2
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\Transformers;
10
11
use Foundation\Abstracts\Transformers\Transformer;
12
13
class PermissionTransformer extends Transformer
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\Tr...s\PermissionTransformer. Since you implemented __get, consider adding a @property annotation.
Loading history...
26
        ];
27
    }
28
}
29