GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

UserTransformer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 1 Features 1
Metric Value
wmc 1
c 2
b 1
f 1
lcom 0
cbo 2
dl 0
loc 19
rs 10
ccs 5
cts 5
cp 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A transform() 0 9 1
1
<?php
2
3
namespace App\Transformers;
4
5
use App\User;
6
use League\Fractal\TransformerAbstract;
7
8
class UserTransformer extends TransformerAbstract
9
{
10
    /**
11
     * Turn this item object into a generic array.
12
     *
13
     * @param User $user
14
     *
15
     * @return array
16
     */
17 2
    public function transform(User $user)
18
    {
19
        return [
20 2
            'id'     => $user->id,
21 2
            'name'   => $user->name,
22 2
            'email'  => $user->email,
23 2
            'avatar' => $user->avatar,
24
        ];
25
    }
26
}
27