Completed
Branch v2.0.0 (f654ea)
by Alexander
01:15
created

UserPresenter::singleUserObject()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 11
rs 9.9
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Domain\User;
4
5
use stdClass;
6
7
class UserPresenter
8
{
9
    public static function singleUserObject(User $user): stdClass
10
    {
11
        $object = new stdClass();
12
13
        $object->id = $user->getId();
14
        $object->email = $user->getEmail();
15
        $object->name = $user->getName();
0 ignored issues
show
Bug introduced by
Consider using $user->name. There is an issue with getName() and APC-enabled PHP versions.
Loading history...
16
        $object->role = $user->getRole();
17
18
        return $object;
19
    }
20
}
21