Code Duplication    Length = 10-11 lines in 2 locations

app/Containers/Authorization/UI/API/Transformers/PermissionTransformer.php 1 location

@@ 29-38 (lines=10) @@
26
     *
27
     * @return array
28
     */
29
    public function transform(Permission $permission)
30
    {
31
        return [
32
            'object'       => 'Permission',
33
            'id'           => $permission->getHashedKey(), // << Unique Identifier
34
            'name'         => $permission->name, // << Unique Identifier
35
            'description'  => $permission->description,
36
            'display_name' => $permission->display_name,
37
        ];
38
    }
39
40
}
41

app/Containers/Authorization/UI/API/Transformers/RoleTransformer.php 1 location

@@ 29-39 (lines=11) @@
26
     *
27
     * @return array
28
     */
29
    public function transform(Role $role)
30
    {
31
        return [
32
            'object'       => 'Role',
33
            'id'           => $role->getHashedKey(), // << Unique Identifier
34
            'name'         => $role->name, // << Unique Identifier
35
            'description'  => $role->description,
36
            'display_name' => $role->display_name,
37
            'level'        => $role->level,
38
        ];
39
    }
40
41
    /**
42
     * @param \App\Containers\Authorization\Models\Role $role