public function __construct(Role $role, RoleCopyStruct $roleCopyStruct)
28
{
29
$this->role = $role;
30
$this->roleCopyStruct = $roleCopyStruct;
31
}
32
33
public function getRole(): Role
34
{
35
return $this->role;
36
}
37
38
public function getCopiedRole(): Role
39
{
40
if (!$this->hasCopiedRole()) {
41
throw new UnexpectedValueException(sprintf('Return value is not set or not of type %s. Check hasRole() or set it using setRole() before you call the getter.', Role::class));