RoleResponse::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 7
rs 10
1
<?php
2
3
namespace AcquiaCloudApi\Response;
4
5
class RoleResponse
6
{
7
    public string $uuid;
8
9
    public string $name;
10
11
    public string $description;
12
13
    public ?object $last_edited;
14
15
    /**
16
     * @var PermissionsResponse<PermissionResponse> $permissions
17
     */
18
    public PermissionsResponse $permissions;
19
20
    public function __construct(object $role)
21
    {
22
        $this->uuid = $role->uuid;
23
        $this->name = $role->name;
24
        $this->description = $role->description;
25
        $this->last_edited = $role->last_edited;
26
        $this->permissions = new PermissionsResponse($role->permissions);
27
    }
28
}
29