Fix pint issues

This commit is contained in:
Bubka 2025-03-27 17:19:57 +01:00
parent ad43aa777b
commit e624995ebc
12 changed files with 25 additions and 29 deletions

View File

@ -131,8 +131,7 @@ class GroupController extends Controller
// are not assigned to any group record.
if ($group->id === 0) {
$twofaccounts = $request->user()->twofaccounts;
}
else {
} else {
$twofaccounts = $group->twofaccounts;
}

View File

@ -41,7 +41,7 @@ class GroupStoreRequest extends FormRequest
*
* @return array<string, string>
*/
public function messages(): array
public function messages() : array
{
return [
'name.not_in' => __('errors.reserved_name_please_choose_something_else'),

View File

@ -28,7 +28,7 @@ class SinglePageController extends Controller
$publicSettings = $appSettings->only([
'disableRegistration',
'enableSso',
'useSsoOnly'
'useSsoOnly',
]);
$settings = $appSettings->map(function (mixed $item, string $key) {
return null;

View File

@ -117,8 +117,7 @@ class Group extends Model
$group->id = 0;
return $group;
}
else {
} else {
return parent::resolveRouteBinding($value, $field);
}
}

View File

@ -431,12 +431,10 @@ class TwoFAccount extends Model implements Sortable
$OtpDto->otp_type = $this->otp_type;
$OtpDto->generated_at = $time ?: time();
$expires_in = $this->generator->expiresIn(); /** @phpstan-ignore-line - expiresIn() is in the TOTPInterface only */
if ($this->otp_type === self::TOTP) {
$OtpDto->password = $this->generator->at($OtpDto->generated_at);
$OtpDto->next_password = $this->generator->at($OtpDto->generated_at + $expires_in + 2);
}
else {
} else {
$OtpDto->password = SteamTotp::getAuthCode(base64_encode(Base32::decodeUpper($this->secret)));
$OtpDto->next_password = SteamTotp::getAuthCode(base64_encode(Base32::decodeUpper($this->secret)), $expires_in + 2);
}