mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-26 06:52:13 +02:00
Fix type hinting for TwoFAccount resources
This commit is contained in:
parent
91fd43b528
commit
77234ddc66
@ -14,8 +14,8 @@ class TwoFAccountReadResource extends TwoFAccountStoreResource
|
|||||||
{
|
{
|
||||||
return array_merge(
|
return array_merge(
|
||||||
[
|
[
|
||||||
'id' => $this->id,
|
'id' => (int) $this->id,
|
||||||
'group_id' => intval($this->group_id),
|
'group_id' => is_null($this->group_id) ? null : (int) $this->group_id,
|
||||||
],
|
],
|
||||||
parent::toArray($request)
|
parent::toArray($request)
|
||||||
);
|
);
|
||||||
|
@ -23,10 +23,10 @@ class TwoFAccountStoreResource extends JsonResource
|
|||||||
!$request->has('withSecret') || (int) filter_var($request->input('withSecret'), FILTER_VALIDATE_BOOLEAN) == 1,
|
!$request->has('withSecret') || (int) filter_var($request->input('withSecret'), FILTER_VALIDATE_BOOLEAN) == 1,
|
||||||
$this->secret
|
$this->secret
|
||||||
),
|
),
|
||||||
'digits' => $this->digits,
|
'digits' => (int) $this->digits,
|
||||||
'algorithm' => $this->algorithm,
|
'algorithm' => $this->algorithm,
|
||||||
'period' => $this->period,
|
'period' => is_null($this->period) ? null : (int)$this->period,
|
||||||
'counter' => $this->counter
|
'counter' => is_null($this->counter) ? null : (int)$this->counter
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user