Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
66 | 1 | public static function create(array $payload): AppRolesEvent |
|
67 | { |
||
68 | 1 | $senderId = isset($payload['sender']) ? $payload['sender']['id'] : ''; |
|
69 | 1 | $recipientId = $payload['recipient']['id']; |
|
70 | 1 | $timestamp = $payload['timestamp']; |
|
71 | 1 | $appRoles = AppRoles::create($payload['app_roles']); |
|
72 | |||
73 | 1 | return new static($senderId, $recipientId, $timestamp, $appRoles); |
|
74 | } |
||
75 | } |
||
76 |